stable

Forked from tuleap/stable

Clone or download

Read-only

request #5951 - Avoid hardcoded redirect on login when possible

When we configure Tuleap behind a reverse proxy that does URL & domain rewriting most of the time, it doesn't play well with hardcoded redirect (with the domain name in the redirect request). As we only need the domain when we change of protocol (http <-> https), starting this commit, Tuleap will do relative redirects (without domain name) when there is no protocol change. As a matter of fact, when Tuleap is configured in such a setup, it should stick to one protocol (either full HTTP or full HTTPS) and not allow both. Change-Id: I789d914b466d573453a6c33c8f7b4783f0c66bcd

Modified Files

Name
M src/common/include/HTTPRequest.class.php +3 −0 Go to diff View file
M src/common/include/URL.class.php +1 −1 Go to diff View file
M src/common/include/URLRedirect.class.php +61 −0 Go to diff View file
M src/common/include/URLVerification.class.php +0 −2 Go to diff View file
M src/common/user/LoginPresenter.class.php +0 −1 Go to diff View file
M src/www/include/session.php +1 −1 Go to diff View file
M src/www/include/utils.php +3 −59 Go to diff View file
M src/www/my/redirect.php +3 −19 Go to diff View file
A tests/simpletest/common/include/URLRedirectTest.php +84 −0 Go to diff View file
M tests/simpletest/common/include/URLTest.php +1 −0 Go to diff View file
M tests/simpletest/common/include/URLVerificationTest.php +13 −4 Go to diff View file