From 077d23176a8f098766bf492081ae5ab9acb2d285 Mon Sep 17 00:00:00 2001 From: Carsten Lenz <clenz2@csc.com> Date: Fri, 13 Jun 2014 08:26:23 -0400 Subject: [PATCH] Add german translation of welcome.mkd --- src/main/java/com/gitblit/servlet/AuthenticationFilter.java | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gitblit/servlet/AuthenticationFilter.java b/src/main/java/com/gitblit/servlet/AuthenticationFilter.java index 97ca438..5710a4a 100644 --- a/src/main/java/com/gitblit/servlet/AuthenticationFilter.java +++ b/src/main/java/com/gitblit/servlet/AuthenticationFilter.java @@ -16,12 +16,15 @@ package com.gitblit.servlet; import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; import java.security.Principal; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -62,7 +65,7 @@ protected IAuthenticationManager authenticationManager; @Override - protected void inject(ObjectGraph dagger) { + protected void inject(ObjectGraph dagger, FilterConfig filterConfig) { this.authenticationManager = dagger.get(IAuthenticationManager.class); } @@ -100,6 +103,12 @@ 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 +189,4 @@ return user; } } -} \ No newline at end of file +} -- Gitblit v1.9.1