diff options
author | James Moger <james.moger@gitblit.com> | 2013-11-16 09:12:10 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-11-26 16:07:04 -0500 |
commit | 6f442a4a7a66a0ba6d5189a0430cd5e95fb39ea8 (patch) | |
tree | dde4f214bcc49a1f851df96124798d8609985d74 /src/main/java/com/gitblit/GitBlit.java | |
parent | 8a71a13f23e6352e8a50e500401959ca90eaf8dc (diff) | |
download | gitblit-6f442a4a7a66a0ba6d5189a0430cd5e95fb39ea8.tar.gz gitblit-6f442a4a7a66a0ba6d5189a0430cd5e95fb39ea8.zip |
Automatically adjust web.forwardSlash on Tomcat containers
One issue that frequently arises in the discussion group and the bug
tracker is how Tomcat automatically re-encodes %2f as '/' which breaks
url parameters with %2f. After documenting this in half a dozen places
it still comes up. Clearly I haven't done enough.
Gitblit will now act on, instead of just report, an improperly configured
web.forwardSlash character on Tomcat containers. This will make Gitblit
"just work" for more users and will make the world a better place.
Change-Id: I344428804070a2d6082022cf6b80e2a3d83cea84
Diffstat (limited to 'src/main/java/com/gitblit/GitBlit.java')
-rw-r--r-- | src/main/java/com/gitblit/GitBlit.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java index f191d6a6..97372e11 100644 --- a/src/main/java/com/gitblit/GitBlit.java +++ b/src/main/java/com/gitblit/GitBlit.java @@ -3554,8 +3554,6 @@ public class GitBlit implements ServletContextListener { configureFanout(); configureGitDaemon(); configureCommitCache(); - - ContainerUtils.CVE_2007_0450.test(); } protected void configureMailExecutor() { @@ -3817,6 +3815,10 @@ public class GitBlit implements ServletContextListener { FileSettings settings = new FileSettings(localSettings.getAbsolutePath()); configureContext(settings, base, true); } + + // WAR or Express is likely to be running on a Tomcat. + // Test for the forward-slash/%2F issue and auto-adjust settings. + ContainerUtils.CVE_2007_0450.test(settings); } settingsModel = loadSettingModels(); |