Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect from /login should be an absolute redirect. #67

Open
flipmcf opened this issue Dec 8, 2022 · 1 comment
Open

redirect from /login should be an absolute redirect. #67

flipmcf opened this issue Dec 8, 2022 · 1 comment
Labels

Comments

@flipmcf
Copy link

flipmcf commented Dec 8, 2022

Following the docs here:

https://training.plone.org/plone-deployment/edit-project.html#activate-and-configure-the-add-on

visit the classic-ui and go to http://localhost:8080/plonesite/login/

This will give relative redirect to authomatic-handler:

curl -i localhost:8080/RFAQSL/login/
HTTP/1.1 302 Found
Content-Length: 0
Date: Thu, 08 Dec 2022 13:36:04 GMT
Location: authomatic-handler
Server: waitress
Via: waitress
X-Frame-Options: SAMEORIGIN
X-Powered-By: Zope (www.zope.dev), Python (www.python.org)

And land you at http://localhost:8080/plonesite/login/authmatic-handler and give you a 404

However, note that the user experience when you click "login" in the classic ui you get a modal showing http://localhost:8080/plonesite/authmatic-handler

This is a bit strange, and I'm not sure what behavior is correct. But I think that the http://localhost:8080/plonesite/login url should do a redirect to an absolute path, and then make sure that the modal still works.

@flipmcf
Copy link
Author

flipmcf commented Dec 8, 2022

Just after writing this, I see what's going on.

The docs have a trailing slash - while the UI links don't. This is what gives the inconsistent behavior from the relative redirect.
Screenshot from 2022-12-08 09-21-28

So,
http://localhost:8080/plonesite/login
http://localhost:8080/plonesite/login/

Give different results. Because HTTP.

I'm still leaning towards the redirect being absolute instead of relative, based on "explicit is better than implicit" so I'm not going to close it without someone else's opinion here. Docs are probably easier to change, but humans (especially me) are dumb and do dumb things and bother people for dumb reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant