Skip to content

Commit

Permalink
[FIXED JENKINS-19613] 49c731f made PROXY_HEADER static under the assu…
Browse files Browse the repository at this point in the history
…mption that XStream would treat that like a missing field.

Unfortunately it threw an error instead, breaking startup; fixed by renaming the constant.

(cherry picked from commit d82ba3b)
  • Loading branch information
jglick authored and olivergondza committed Oct 18, 2013
1 parent 7501dbe commit 582a87f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion changelog.html
Expand Up @@ -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=-->

Expand Down
Expand Up @@ -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) {
Expand Down

0 comments on commit 582a87f

Please sign in to comment.