Browse Source

Automatically decode %7E in repository names to ~ (issue-278)

tags/v1.3.1
James Moger 10 years ago
parent
commit
d22773711c
2 changed files with 10 additions and 1 deletions
  1. 2
    1
      releases.moxie
  2. 8
    0
      src/main/java/com/gitblit/GitBlit.java

+ 2
- 1
releases.moxie View File

@@ -13,12 +13,13 @@ r18: {
security: ~
fixes:
- Gitblit-as-viewer with no repository urls failed to display summary page (issue 269)
- Fixed incorrect tagger in the dashboard pages (issue-276)
- Automatically decode %7E in repository names from git clients that encode ~ (issue-278)
- Fixed missing model class dependencies in Gitblit Manager build
- Fix for IE10 compatibility mode
- Reset dashboard and activity commit cache on branch REWIND or DELETE
- Fixed bug with adding new local users with external authentication
- Fixed missing clone url on the empty repository page
- Fixed incorrect tagger in the dashboard pages (issue-276)
- Fixed Ubuntu service script for LSB compliance
- Inserted "sleep 5" in Ubuntu & Centos bash script for service restart
changes:

+ 8
- 0
src/main/java/com/gitblit/GitBlit.java View File

@@ -1557,6 +1557,10 @@ public class GitBlit implements ServletContextListener {
* @return repository or null
*/
public Repository getRepository(String repositoryName, boolean logError) {
// Decode url-encoded repository name (issue-278)
// http://stackoverflow.com/questions/17183110
repositoryName = repositoryName.replace("%7E", "~").replace("%7e", "~");
if (isCollectingGarbage(repositoryName)) {
logger.warn(MessageFormat.format("Rejecting request for {0}, busy collecting garbage!", repositoryName));
return null;
@@ -1656,6 +1660,10 @@ public class GitBlit implements ServletContextListener {
* @return repository model or null
*/
public RepositoryModel getRepositoryModel(String repositoryName) {
// Decode url-encoded repository name (issue-278)
// http://stackoverflow.com/questions/17183110
repositoryName = repositoryName.replace("%7E", "~").replace("%7e", "~");

if (!repositoryListCache.containsKey(repositoryName)) {
RepositoryModel model = loadRepositoryModel(repositoryName);
if (model == null) {

Loading…
Cancel
Save