Skip to content
Permalink
Browse files
[FIXED JENKINS-19613] 49c731f made PROXY_HEADER static under the assu…
…mption that XStream would treat that like a missing field.

Unfortunately it threw an error instead, breaking startup; fixed by renaming the constant.
  • Loading branch information
jglick committed Sep 26, 2013
1 parent 1f5673d commit d82ba3b7524096fe571a37894c5b85091f4f45ad
Showing with 5 additions and 3 deletions.
  1. +3 −1 changelog.html
  2. +2 −2 core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java
@@ -55,7 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
<li class='major bug'>
Default crumb issuer configurations saved in older releases did not load as of Jenkins 1.531.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-19613">issue 19613</a>)
</ul>
</div><!--=TRUNK-END=-->

@@ -100,11 +100,11 @@ public boolean validateCrumb(ServletRequest request, String salt, String crumb)
return false;
}

private static final String PROXY_HEADER = "X-Forwarded-For";
private static final String X_FORWARDED_FOR = "X-Forwarded-For";

private String getClientIP(HttpServletRequest req) {
String defaultAddress = req.getRemoteAddr();
String forwarded = req.getHeader(PROXY_HEADER);
String forwarded = req.getHeader(X_FORWARDED_FOR);
if (forwarded != null) {
String[] hopList = forwarded.split(",");
if (hopList.length >= 1) {

0 comments on commit d82ba3b

Please sign in to comment.