openshift / origin-server

OpenShift 2 (deprecated)
889 stars 516 forks source link

Openshift doesn't accept app aliases containing an underscore #6384

Closed dinhxuanvu closed 8 years ago

dinhxuanvu commented 8 years ago

Currently, application aliases with underscore(s) are not allowed due to regex restriction during alias verification (controller/app/models/application.rb validate_alias(fqdn)).

Having underscore(s) in URL is generally not recommended but it's not technically wrong to have. So, the regex for validate_alias method is modified to accept underscore(s).

Bug: 1329915 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1329915

Signed-off-by: Vu Dinh vdinh@redhat.com

dinhxuanvu commented 8 years ago

[test] @tiwillia Please review. Thanks :)

openshift-bot commented 8 years ago

Evaluated for online test up to b1697fe9140e968b98eef9435527018af5237fd4

tiwillia commented 8 years ago

LGTM, but...

RFC 1123, section 2.1 refers to RFC 952 to determine proper hostname/subdomain syntax. The RFC states that the name should match the following: <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>]. Underscores do not look to be allowed.

cc @Miciah

openshift-bot commented 8 years ago

Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9284/)

dinhxuanvu commented 8 years ago

As @tiwillia comment above, the underscore should not be allowed in alias. So this PR and the bug associated are closed. Thanks all!