Motion - Bug Report 2007x 03x 25x 184229
You are here: Foswiki>Motion Web>BugReports>BugReport2007x03x25x184229 (21 Mar 2010, AngelCarpintero)Edit Attach

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

BugReportForm edit

TopicTitle wrong parse of various url strings
BugStatus Rejected
AssignedBugTo Angel.Carpintero
SubmittedBy PietroVitelli
Topic revision: r4 - 21 Mar 2010, AngelCarpintero
Copyright © 1999-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.