[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: url: allow brackets in path part

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Dec 4 16:00:52 UTC 2021



Rémi Denis-Courmont pushed to branch 3.0.x at VideoLAN / VLC


Commits:
59b3fa84 by Rémi Denis-Courmont at 2021-12-04T15:48:57+00:00
url: allow brackets in path part

As brackets are separators only within the authority part, thier use
within (or on the edges of) the path does not create any ambiguity.

(cherry picked from commit 721751d4f8f902ce042ffd015c70134aba373a2b)

Fixes #26092
Fixes #26348

- - - - -
ff50ff1e by Rémi Denis-Courmont at 2021-12-04T15:48:57+00:00
url: add test case

(cherry picked from commit ff0a252270401c4a0f09580c692f544430ec8883)

- - - - -


2 changed files:

- src/test/url.c
- src/text/url.c


Changes:

=====================================
src/test/url.c
=====================================
@@ -287,6 +287,8 @@ int main (void)
                    "www.example.com", 0, "/caf%C3%A9/", NULL);
     test_url_parse("p://h/white%20spaced", "p", NULL, NULL, "h", 0,
                    "/white%20spaced", NULL);
+    test_url_parse("p://h/[hello:world]", "p", NULL, NULL, "h", 0,
+                   "/[hello:world]", NULL);
     /* Relative URIs */
     test_url_parse("//example.com", NULL, NULL, NULL, "example.com", 0,
                    NULL, NULL);


=====================================
src/text/url.c
=====================================
@@ -398,7 +398,7 @@ static bool vlc_uri_host_validate(const char *str)
 
 static bool vlc_uri_path_validate(const char *str)
 {
-    return vlc_uri_component_validate(str, "/@:");
+    return vlc_uri_component_validate(str, "/@:[]");
 }
 
 static int vlc_UrlParseInner(vlc_url_t *restrict url, const char *str)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f759c3483130847ff43e9e7f436c19acec649116...ff50ff1e67f9591de4b73c7769ba0291fbb698a9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f759c3483130847ff43e9e7f436c19acec649116...ff50ff1e67f9591de4b73c7769ba0291fbb698a9
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list