Web UI login with the kiosk's PIN/password; shortcuts list on the Sites page
When the kiosk's password protection is on, the Web UI now asks for the same PIN/password the lock screen uses: random session cookie (12 h, HttpOnly, SameSite=Strict), the lock screen's wrong-code slowdown, sessions end when the kiosk's code changes, sign out. With protection off nothing changes. The Sites page (Web UI and terminal menu) lists the back/forward/home and site-switching keys. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wi3ZQveYdjfcrEsyazq32
This commit is contained in:
+14
-1
@@ -179,4 +179,17 @@ function saveConfig(patch) {
|
||||
return loadConfig();
|
||||
}
|
||||
|
||||
module.exports = { loadConfig, saveConfig, CONFIG_PATH, SCALAR_DEFAULTS };
|
||||
// What the Web UI login needs: whether the kiosk's password protection is
|
||||
// on and the stored SHA-256 of its unlock code (the same one the lock screen
|
||||
// checks). Only used server-side to verify a login - never sent to a browser.
|
||||
function readLockSettings() {
|
||||
const existing = readExisting();
|
||||
const hash = typeof existing.lockoutPassword === 'string' ? existing.lockoutPassword : '';
|
||||
return {
|
||||
enabled: existing.enablePasswordProtection === true && hash.length > 0,
|
||||
hash,
|
||||
codeType: existing.lockoutCodeType === 'pin' ? 'pin' : 'password',
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { loadConfig, saveConfig, readLockSettings, hashPassword, CONFIG_PATH, SCALAR_DEFAULTS };
|
||||
|
||||
Reference in New Issue
Block a user