diff options
author | Matthias Cullmann <matthias.cullmann@gmail.com> | 2014-01-28 11:16:11 +0100 |
---|---|---|
committer | Matthias Cullmann <matthias.cullmann@gmail.com> | 2014-01-28 11:16:11 +0100 |
commit | c5c6416c8795c155ae617075bd8e33f179000f96 (patch) | |
tree | a051e6af982e49b7e697e7ea7e7a7948446281e9 /src/main | |
parent | 21ca9d90c6f3b29e4574fe143bbfa7e0ef0b0514 (diff) | |
download | gitblit-c5c6416c8795c155ae617075bd8e33f179000f96.tar.gz gitblit-c5c6416c8795c155ae617075bd8e33f179000f96.zip |
allow specials chars in repo names
see http://code.google.com/p/gitblit/issues/detail?id=362
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/gitblit/servlet/AuthenticationFilter.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/servlet/AuthenticationFilter.java b/src/main/java/com/gitblit/servlet/AuthenticationFilter.java index 97ca438f..742f329a 100644 --- a/src/main/java/com/gitblit/servlet/AuthenticationFilter.java +++ b/src/main/java/com/gitblit/servlet/AuthenticationFilter.java @@ -100,6 +100,12 @@ public abstract class AuthenticationFilter extends DaggerFilter { url = url.substring(1);
}
String fullUrl = url + (StringUtils.isEmpty(params) ? "" : ("?" + params));
+ try {
+ fullUrl = URLDecoder.decode(fullUrl, "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ logger.warn("UTF-8 decoding of URL failed: "+fullUrl, e);
+ e.printStackTrace();
+ }
return fullUrl;
}
@@ -180,4 +186,4 @@ public abstract class AuthenticationFilter extends DaggerFilter { return user;
}
}
-}
\ No newline at end of file +}
|