| | |
| | | import com.gitblit.utils.ArrayUtils; |
| | | import com.gitblit.utils.Base64; |
| | | import com.gitblit.utils.ByteFormat; |
| | | import com.gitblit.utils.CommitCache; |
| | | import com.gitblit.utils.ContainerUtils; |
| | | import com.gitblit.utils.DeepCopier; |
| | | import com.gitblit.utils.FederationUtils; |
| | |
| | | userService.logout(user); |
| | | } |
| | | |
| | | /** |
| | | * Encode the username for user in an url. |
| | | * |
| | | * @param name |
| | | * @return the encoded name |
| | | */ |
| | | protected String encodeUsername(String name) { |
| | | return name.replace("@", "%40"); |
| | | return name.replace("@", "%40").replace(" ", "%20").replace("\\", "%5C"); |
| | | } |
| | | |
| | | /** |
| | | * Decode a username from an encoded url. |
| | | * |
| | | * @param name |
| | | * @return the decoded name |
| | | */ |
| | | protected String decodeUsername(String name) { |
| | | return name.replace("%40", "@"); |
| | | return name.replace("%40", "@").replace("%20", " ").replace("%5C", "\\"); |
| | | } |
| | | |
| | | /** |
| | |
| | | configureFanout(); |
| | | configureGitDaemon(); |
| | | |
| | | CommitCache.instance().setCacheDays(settings.getInteger(Keys.web.activityCacheDays, 14)); |
| | | |
| | | ContainerUtils.CVE_2007_0450.test(); |
| | | } |
| | | |