|
From: Juri L. <no...@gi...> - 2026-09-17 15:52:50
|
Branch: refs/heads/develop Home: https://github.com/eXist-db/exist Commit: b322d2c21fbf24fbbd6f920d3cb6c8fcffbe9bed https://github.com/eXist-db/exist/commit/b322d2c21fbf24fbbd6f920d3cb6c8fcffbe9bed Author: Martin Middel <ma...@el...> Date: 2026-09-15 (Tue, 15 Sep 2026) Changed paths: M exist-core/src/main/java/org/exist/security/AbstractRealm.java A exist-core/src/test/java/org/exist/storage/StartupTriggerUpdateAccountAndGroupTest.java Log Message: ----------- fix(post-install): pass a broker when creating new users This fixes an issue when you'd create a user in the post-install phase if you install an app by placing the xar in the autodeploy directory. The `exist` broker is created _after_ the startup triggers are done. Why .save() (no broker) and .save(broker) are two different code paths, and only one of them is safe to call during startup: - .save() -> Configurator.save(instance, uri) → calls the static BrokerPool.getInstance(), which looks up a named registry entry ("exist") that only gets populated at the very end of BrokerPool._initialize() — after AutoDeploymentTrigger (a StartupTrigger) has already run. Called from inside a startup trigger, this fails unconditionally, every time. - .save(broker) -> passes the broker to Configurator.save(broker, instance, uri), which just does broker.getCollection(...) — no registry lookup, works fine at any point in startup. updateAccount/updateGroup already call getDatabase().getActiveBroker() one line above (for the permission check) - a perfectly valid broker, available even mid-startup — and then throwing it away and calling the no-broker .save() anyway. addAccount/addGroup (the creation-side twins) already got this right. But `update` did not. Fixes #1610 Commit: fbc06b2847c5084776ad4f43137c2a9c95f5153a https://github.com/eXist-db/exist/commit/fbc06b2847c5084776ad4f43137c2a9c95f5153a Author: Juri Leino <gi...@li...> Date: 2026-09-17 (Thu, 17 Sep 2026) Changed paths: M exist-core/src/main/java/org/exist/security/AbstractRealm.java A exist-core/src/test/java/org/exist/storage/StartupTriggerUpdateAccountAndGroupTest.java Log Message: ----------- Merge pull request #6714 from eXist-db/fix-user-creation-while-starting [bugfix] Pass a broker when creating new users Compare: https://github.com/eXist-db/exist/compare/9e51fdf62f20...fbc06b2847c5 To unsubscribe from these emails, change your notification settings at https://github.com/eXist-db/exist/settings/notifications |