]> source.dussan.org Git - gitblit.git/commitdiff
allow specials chars in repo names 136/head
authorMatthias Cullmann <matthias.cullmann@gmail.com>
Tue, 28 Jan 2014 10:16:11 +0000 (11:16 +0100)
committerMatthias Cullmann <matthias.cullmann@gmail.com>
Tue, 28 Jan 2014 10:16:11 +0000 (11:16 +0100)
see http://code.google.com/p/gitblit/issues/detail?id=362

src/main/java/com/gitblit/servlet/AuthenticationFilter.java

index 97ca438f56665853fd8f40a6d3b6ee51a283fb45..742f329af75dc66c159f9f578f7af057c559fe1e 100644 (file)
@@ -100,6 +100,12 @@ public abstract class AuthenticationFilter extends DaggerFilter {
                        url = url.substring(1);\r
                }\r
                String fullUrl = url + (StringUtils.isEmpty(params) ? "" : ("?" + params));\r
+               try {\r
+                       fullUrl = URLDecoder.decode(fullUrl, "UTF-8");\r
+               } catch (UnsupportedEncodingException e) {\r
+                       logger.warn("UTF-8 decoding of URL failed: "+fullUrl, e);\r
+                       e.printStackTrace();\r
+               }\r
                return fullUrl;\r
        }\r
 \r
@@ -180,4 +186,4 @@ public abstract class AuthenticationFilter extends DaggerFilter {
                        return user;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r