Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2d71c39

Browse files
committedMar 5, 2025··
Refs #38269 - fix container-image-name validator
1 parent 206baa0 commit 2d71c39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎app/lib/katello/validators/container_image_name_validator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def validate_each(record, attribute, value)
88
end
99

1010
def self.validate_name(name)
11-
if name.empty? || name.length > 255 || !/\A([a-z0-9]+[a-z0-9\-_.]*)+(\/[a-z0-9]+[a-z0-9\-_.]*)*\z/.match?(name)
11+
if name.empty? || name.length > 255 || !/\A([a-z0-9]+([\-_.]*[a-z0-9]+)*)+(\/[a-z0-9]+([\-_.]*[a-z0-9]+)*)*\z/.match?(name)
1212
return false
1313
end
1414
true

0 commit comments

Comments
 (0)
Please sign in to comment.