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

Add context path to the redirect URL in saml_login.jsp #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

max-allan-surevine
Copy link

NB I am no java dev and no virtually nothing about Confluence's internal workings, so this may be an awful way to make it work!
I was using confluence with a context path and noticed that logins worked but redirected me to a URL without the context path. Looking at packets shows :
GET /confluence/display/SIC/Hello HTTP/1.1
gets a 302 redirect to
Location: /confluence/login.action?os_destination=%2Fpages%2Fviewpage.action%3FspaceKey%3DSIC%26title%3DHello&permissionViolation=true
With the default authenticator.

However, with the SAML plugin, redirect to :
Location: /confluence/saml_login.jsp?os_destination=%2Fpages%2Fviewpage.action%3FspaceKey%3DSIC%26title%3DHello

And the redirect uri includes the os_destination but not the context path.
My simple fix could maybe do with some logic if context path is "" but I think adding "" to the rest of the path is probably safe enough. I don't know if the os_destination should ever include the context. I couldn't find any docs about what it is supposed to be.

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

Successfully merging this pull request may close these issues.

1 participant