mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 11:06:06 +01:00
Repository name allows upper case.
This commit is contained in:
@@ -70,7 +70,7 @@ class CreateRepositoryController extends ControllerBase {
|
|||||||
*/
|
*/
|
||||||
def repository: Constraint = new Constraint(){
|
def repository: Constraint = new Constraint(){
|
||||||
def validate(name: String, value: String): Option[String] = {
|
def validate(name: String, value: String): Option[String] = {
|
||||||
if(!value.matches("^[a-z0-9\\-_]+$")){
|
if(!value.matches("^[a-zA-Z0-9\\-_]+$")){
|
||||||
Some("Repository name contains invalid character.")
|
Some("Repository name contains invalid character.")
|
||||||
} else if(getRepositories(context.loginUser).contains(value)){
|
} else if(getRepositories(context.loginUser).contains(value)){
|
||||||
Some("Repository already exists.")
|
Some("Repository already exists.")
|
||||||
|
|||||||
Reference in New Issue
Block a user