Skip to content

Commit fdbe95b

Browse files
authored
Allow slash when adding username to smtp relay (Fixes hestiacp#4973) (hestiacp#4974)
* Allow slash when adding username to smtp relay (Fixes hestiacp#4973) * Allow also backslash when adding username to smtp relay (Fixes hestiacp#4973)
1 parent 113d98a commit fdbe95b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

func/main.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,8 @@ format_no_quotes() {
16211621
}
16221622

16231623
is_username_format_valid() {
1624-
if [[ ! "$1" =~ ^[A-Za-z0-9._%+-]+@[[:alnum:].-]+\.[A-Za-z]{2,63}$ ]]; then
1624+
if [[ ! "$1" =~ ^[A-Za-z0-9._%+-]+@[[:alnum:].-]+\.[A-Za-z]{2,63}$ ]] \
1625+
&& [[ ! "$1" =~ ^[A-Za-z0-9._%+-]+(/|\\)[A-Za-z0-9._%+-]+$ ]]; then
16251626
is_string_format_valid "$1" "$2"
16261627
fi
16271628
}

0 commit comments

Comments
 (0)