How to stop Confluence login screen from stripping HTML parameters?

We sometimes use HTML parameters to customize screen rendering in Confluence. For example?

http://localhost:8090/wiki/display/TESTSPACE/Test+Page?testparam=foo

This works if the user is already logged in, but if the user encounters the Confluence login screen it redirects to…

http://localhost:8090/wiki/login.action?os_destination=%2Fpages%2Fviewpage.action%3FspaceKey%3DTESTSPACE%26title%3DTest%2BPage&permissionViolation=true

…with the original HTML parameters replaced with the permissionViolation parameter, and as a result the original parameter is lost. After login, the user just goes to the address without the HTML parameters:

http://localhost:8090/wiki/display/TESTSPACE/Test+Page

Does anyone know if it is possible to get the login screen to retain the original HTML parameters?

I’ve managed to find a “fix” for this (or at least an acceptable workaround for my purposes):

You must specify the link in one of the following forms:

http://localhost:8090/pages/viewpage.action?spaceKey=TESTSPACE&title=Test+Page&testparam=foo

Or

http://localhost:8090/pages/viewpage.action?pageId=12345&testparam=foo

The login screen doesn’t strip the URL parameters when specified in this format.

(It would still be better if the original link didn’t strip the parameters, since now I have to go through and search for all the existing links and update them.)

1 Like

See also CONFSERVER-59345.

Andrew, you are an absolute life saver by finding that workaround! Thanks so much