summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-05-21 11:47:35 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-05-21 14:04:10 -0500
commit0bfc133e64db5e0d530e3ba113a65d59a6dcee10 (patch)
tree0bd2f762c8276c248630314cb3be34741e2cabf3
parent0d57cc9a266fe8d6fc87df5a769f42b4a45c7221 (diff)
downloadvyos-utils-0bfc133e64db5e0d530e3ba113a65d59a6dcee10.tar.gz
vyos-utils-0bfc133e64db5e0d530e3ba113a65d59a6dcee10.zip
T5940: relax regex of uri user information for 1.3.x compatibility
(cherry picked from commit 3d22aa091bb962c68810f10a6027ef452da84a90)
-rw-r--r--src/url.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/url.ml b/src/url.ml
index 2f3367b..3d77544 100644
--- a/src/url.ml
+++ b/src/url.ml
@@ -30,7 +30,7 @@ let regex_matches regex s =
let host_path_format =
Pcre.regexp
- {|^//(?:[a-zA-Z0-9\-\._~]+(?::[a-zA-Z0-9\-\._~]*)?@)?([a-zA-Z0-9\-\._~]+|\[[a-zA-Z0-9:\.]+\])(?::([0-9]+))?(/.*)?$|}
+ {|^//(?:[^/?#]+(?::[^/?#]*)?@)?([a-zA-Z0-9\-\._~]+|\[[a-zA-Z0-9:\.]+\])(?::([0-9]+))?(/.*)?$|}
let host_name_format = Pcre.regexp {|^[a-zA-Z0-9]+([\-\._~]{1}[a-zA-Z0-9]+)*$|}
let ipv4_addr_format = Pcre.regexp {|^(([1-9]\d{0,2}|0)\.){3}([1-9]\d{0,2}|0)$|}