Prohibit trailing slashes in repository names (issue-104)
| | |
| | | error("Relative folder references (../) are prohibited.");
|
| | | return false;
|
| | | }
|
| | | if (rname.endsWith("/")) {
|
| | | rname = rname.substring(0, rname.length() - 1);
|
| | | }
|
| | |
|
| | | // confirm valid characters in repository name
|
| | | Character c = StringUtils.findInvalidCharacter(rname);
|
| | |
| | | error(getString("gb.illegalRelativeSlash"));
|
| | | return;
|
| | | }
|
| | | if (repositoryModel.name.endsWith("/")) {
|
| | | repositoryModel.name = repositoryModel.name.substring(0, repositoryModel.name.length() - 1);
|
| | | }
|
| | |
|
| | | // confirm valid characters in repository name
|
| | | Character c = StringUtils.findInvalidCharacter(repositoryModel.name);
|