mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-12 23:50:49 +08:00
Enable default emergency account
This commit is contained in:
parent
70bde46eff
commit
07cfbefb6c
9 changed files with 43 additions and 31 deletions
|
|
@ -182,7 +182,7 @@ test('R13/R14: QR challenge store + live identity patch + docs (source)', () =>
|
|||
const acl = readFileSync(join(root, 'lib/dsh-acl.js'), 'utf8')
|
||||
assert.match(acl, /__udsAuthIdentityLive/)
|
||||
const readme = readFileSync(join(root, 'README.zh.md'), 'utf8')
|
||||
assert.doesNotMatch(readme, /Admin@123.*首次启动自动启用/)
|
||||
assert.match(readme, /administrator.*Admin@123/)
|
||||
assert.match(readme, /mintTaskCapability|UDS_TASK_CAPABILITY/)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -234,11 +234,11 @@ test('SEC-06: identity-cache never restores a principal', () => {
|
|||
assert.equal(peekBrowserIdentity(), null)
|
||||
})
|
||||
|
||||
test('SEC-08: new RolesStore does not enable shared default password', async () => {
|
||||
test('SEC-08: new RolesStore enables the default emergency password', async () => {
|
||||
const store = new RolesStore({})
|
||||
await store.init()
|
||||
assert.equal(store.isFallbackEnabled(), false)
|
||||
assert.equal(store.verifyFallback(DEFAULT_FALLBACK_PASSWORD, '127.0.0.1'), false)
|
||||
assert.equal(store.isFallbackEnabled(), true)
|
||||
assert.equal(store.verifyFallback(DEFAULT_FALLBACK_PASSWORD, '127.0.0.1'), true)
|
||||
})
|
||||
|
||||
test('SEC-09: empty roles + non-initial admin cannot bootstrap via middleware helper', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue