Merge pull request #4022 from dokku/4013-slashes-in-app-names

Do not allow slashes in app names
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2020-06-18 12:15:27 -04:00
commit e8eba15e49
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -582,7 +582,7 @@ func IsValidAppName(appName string) error {
return fmt.Errorf("APP must not be null") return fmt.Errorf("APP must not be null")
} }
r, _ := regexp.Compile("^[a-z0-9][^:A-Z]*$") r, _ := regexp.Compile("^[a-z0-9][^/:A-Z]*$")
if r.MatchString(appName) { if r.MatchString(appName) {
return nil return nil
} }
+5
View File
@@ -81,6 +81,11 @@ teardown() {
echo "status: $status" echo "status: $status"
assert_failure assert_failure
run /bin/bash -c "dokku apps:create test/app"
echo "output: $output"
echo "status: $status"
assert_failure
run /bin/bash -c "dokku --app $TEST_APP apps:create" run /bin/bash -c "dokku --app $TEST_APP apps:create"
echo "output: $output" echo "output: $output"
echo "status: $status" echo "status: $status"