mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-22 23:42:11 +01:00
fix basic authentication for systems with turkish locale
This commit is contained in:
@@ -47,6 +47,7 @@ import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
@@ -398,6 +399,23 @@ public class Util
|
||||
return parseDate(dateString, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @param start
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @since 1.17
|
||||
*/
|
||||
public static boolean startWithIgnoreCase(String value, String start)
|
||||
{
|
||||
return (value != null) && (start != null)
|
||||
&& value.toUpperCase(Locale.ENGLISH).startsWith(start);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -120,8 +120,7 @@ public class BasicAuthenticationFilter extends HttpFilter
|
||||
User user = null;
|
||||
String authentication = request.getHeader(HEADER_AUTHORIZATION);
|
||||
|
||||
if (Util.isNotEmpty(authentication)
|
||||
&& authentication.toUpperCase().startsWith(AUTHORIZATION_BASIC_PREFIX))
|
||||
if (Util.startWithIgnoreCase(authentication, AUTHORIZATION_BASIC_PREFIX))
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user