Skip to content

Commit 8e87fff

Browse files
committed
Parse cname without any separators correctly
Signed-off-by: Tobias Wolf <[email protected]>
1 parent 649d1ab commit 8e87fff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/gardenlinux/features/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161

6262
if args.cname:
6363
re_match = re.match(
64-
"([a-zA-Z0-9]+([\\_\\-][a-zA-Z0-9]+)+?)(-([a-z0-9]+)(-([a-z0-9.]+)-([a-z0-9]+))*)?$",
64+
"([a-zA-Z0-9]+([\\_\\-][a-zA-Z0-9]+)*?)(-([a-z0-9]+)(-([a-z0-9.]+)-([a-z0-9]+))*)?$",
6565
args.cname,
6666
)
6767

src/gardenlinux/features/cname_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def main():
2626
args = parser.parse_args()
2727

2828
re_match = re.match(
29-
"([a-zA-Z0-9]+([\\_\\-][a-zA-Z0-9]+)+?)(-([a-z0-9]+)(-([a-z0-9.]+)-([a-z0-9]+))*)?$",
29+
"([a-zA-Z0-9]+([\\_\\-][a-zA-Z0-9]+)*?)(-([a-z0-9]+)(-([a-z0-9.]+)-([a-z0-9]+))*)?$",
3030
args.cname,
3131
)
3232

0 commit comments

Comments
 (0)