package com.gitblit.servlet;\r
\r
import java.io.IOException;\r
-import java.io.UnsupportedEncodingException;\r
-import java.net.URLDecoder;\r
import java.security.Principal;\r
import java.util.Enumeration;\r
import java.util.HashMap;\r
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
retStr.append("%20");\r
} else if (inStr.charAt(i) == '&') {\r
retStr.append("%26");\r
+ } else if (inStr.charAt(i) == '+') {\r
+ retStr.append("%2B");\r
} else {\r
retStr.append(inStr.charAt(i));\r
}\r
* @return the first invalid character found or null if string is acceptable\r
*/\r
public static Character findInvalidCharacter(String name) {\r
- char[] validChars = { '/', '.', '_', '-', '~' };\r
+ char[] validChars = { '/', '.', '_', '-', '~', '+' };\r
for (char c : name.toCharArray()) {\r
if (!Character.isLetterOrDigit(c)) {\r
boolean ok = false;\r
federationSets = \r
\r
#### Repository Names\r
-Repository names must be case-insensitive-unique but are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or `/ _ - . ~`<br/>\r
+Repository names must be case-insensitive-unique but are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or `/ _ - . ~ +`<br/>\r
Whitespace is illegal.\r
\r
Repositories can be grouped within subfolders. e.g. *libraries/mycoollib.git* and *libraries/myotherlib.git*\r