Commit 889362b5 authored by Antoine Cellerier's avatar Antoine Cellerier

* include/vlc_url.h: vlc_UrlParse(): forbid use of '/' in login or password....

* include/vlc_url.h: vlc_UrlParse(): forbid use of '/' in login or password. Fixes use of URLs like "http://www.lemonde.fr/web/video/0,47-0@2-3210,54-913109@51-891944,0.html".
parent df3aadf5
......@@ -63,6 +63,7 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
char *psz_dup;
char *psz_parse;
char *p;
char *p2;
url->psz_protocol = NULL;
url->psz_username = NULL;
......@@ -108,7 +109,8 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
psz_parse = p;
}
p = strchr( psz_parse, '@' );
if( p != NULL )
p2 = strchr( psz_parse, '/' );
if( p != NULL && ( p2 != NULL ? p < p2 : 1 ) )
{
/* We have a login */
url->psz_username = psz_parse;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment