-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(setup): Zope root cookie auth and login form
The GenericSetup "various" import step that originally installs PAS into a Plone portal also migrates the Zope root `/acl_users`. Probably an accident over time, but it results in a cookie auth plugin that doesn't work outside of the Plone portal: 2021-12-27 11:12:02,243 ERROR [Zope.SiteErrorLog:22][waitress-0] ComponentLookupError: http://localhost:49080/api/acl_users/credentials_cookie_auth/login Traceback (innermost last): Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents Module ZPublisher.WSGIPublisher, line 372, in publish_module Module ZPublisher.WSGIPublisher, line 266, in publish Module ZPublisher.mapply, line 85, in mapply Module ZPublisher.WSGIPublisher, line 63, in call_object Module Products.PlonePAS.plugins.cookie_handler, line 106, in login Module Products.PluggableAuthService.PluggableAuthService, line 1153, in updateCredentials Module Products.PlonePAS.plugins.cookie_handler, line 74, in updateCredentials Module zope.component._api, line 165, in getUtility zope.interface.interfaces.ComponentLookupError: (<InterfaceClass plone.registry.interfaces.IRegistry>, '') This import step also removes the `login_form` template which breaks the challenge response. Add an interface check to decide whether to install Plone's `ExtendedCookieAuthHelper` or PAS's vanilla `CookieAuthHelper`.
- Loading branch information
1 parent
0bc8832
commit 17deb97
Showing
3 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fix broken Zope root `/acl_users` cookie plugin on `PlonePAS` install. | ||
[rpatterson] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters