Skip to content

Commit

Permalink
Url: Fix regexes; '.' inside a character class must not be \-escaped
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandres committed Dec 15, 2023
1 parent cf3d9ab commit 9d4853e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zypp-core/url/UrlBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
**
** host = hostname | IPv4 | "[" IPv6-IP "]" | "[v...]"
*/
#define RX_VALID_SCHEME "^[" a_zA_Z "][" a_zA_Z "0-9\\.+-]*$"
#define RX_VALID_SCHEME "^[" a_zA_Z "][" a_zA_Z "0-9.+-]*$"

#define RX_VALID_PORT "^[0-9]{1,5}$"

#define RX_VALID_HOSTNAME "^[[:alnum:]${_}]+([\\.-][[:alnum:]${_}]+)*$"
#define RX_VALID_HOSTNAME "^[[:alnum:]${_}]+([.-][[:alnum:]${_}]+)*$"

#define RX_VALID_HOSTIPV4 \
"^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$"
Expand Down

0 comments on commit 9d4853e

Please sign in to comment.