BUG: wrong parse of various url strings
I'm new to this section, so I don't know if it is the right place to post the following; let me know... It can be this problem has already been fixed in latest version; I've not checked this.
I've noticed there are some url strings aren't parsed correctly; examples:
the url string
http://user:pa/ss@mydomain.com/
is parsed in fields
- service: http
- user: user
- pass: pass
- host: mydomain.com
- port: 80
the url string
http://user:pass@mydom@ain.com/
is parsed in fields
- service: http
- user: user
- pass: pass@mydom
- host: ain.com
- port: 80
I think to solve these ones is enough to modify regular expression used; the actual regular expression used is:
"(http|ftp)://(((.*):(.*))@)?([^/:]|[-.a-z0-9]+)(:([0-9]+))?($|(/[^:]*))"
the new one should be:
"(http|ftp)://((([-.a-z0-9]*):([-.a-z0-9]*))@)?([^/:]|[-.a-z0-9]+)(:([0-9]+))?($|(/[^:]*))"
Environment
Motion version: |
3.2.7 |
ffmpeg version: |
|
Shared libraries: |
|
Server OS: |
Mandriva 2007, kernel 2.6.17-5mdv |
--
PietroVitelli - 25 Mar 2007
Follow up
What is wrong on http://user:pass@mydom@ain.com/ ?
I'm not sure if for instace
pass@mydom is valid as login or password when you used in url :
http://login:pass@ip:port/
Anyway it seems fine for me to include your fix despite is quite strange that someone want to use a login or password that contains:
/ : @
--
AngelCarpintero - 27 Mar 2007
Fix record
No included.
--
AngelCarpintero - 21 Mar 2010