Files
hobbypj-contents/config/admin-credentials.json
Bkk1234 a629e67ca4 feat(admin): verify the backoffice password with PBKDF2, not plaintext compare
- ui/auth.js: derive PBKDF2-HMAC-SHA256(name:password) with a per-deploy salt
  (250k iterations) and compare against the verifier in constant time
- config/admin-credentials.json holds salt/iterations/verifier only — no password
- server/set-admin-password.mjs generates/rotates that file (CLI or hidden prompt)
- login is async now: button shows a pending state; config load errors surface in the form
- SW precaches the credentials file; version bumped to 2026.11.19.4
- docs: README/AGENTS explain rotation and the residual limits of a client-side gate
2026-11-19 11:32:48 +07:00

10 lines
351 B
JSON

{
"note": "สร้างด้วย node server/set-admin-password.mjs — อย่าแก้ด้วยมือ",
"algorithm": "PBKDF2-HMAC-SHA256",
"iterations": 250000,
"key_length": 32,
"salt": "ptORi5IP7LqBNiK7FFBMlw==",
"verifier": "7/yYWnhNh9bczDNYWsazdhsckDazbogyPdGDe5dsdQ4=",
"created_at": "2026-11-19T04:31:23.900Z"
}