Skip to content

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

Open
max-allan-surevine wants to merge 2 commits into
lastpass:masterfrom
max-allan-surevine:master
Open

Add context path to the redirect URL in saml_login.jsp#1
max-allan-surevine wants to merge 2 commits into
lastpass:masterfrom
max-allan-surevine:master

Conversation

@max-allan-surevine

Copy link
Copy Markdown

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