Bug 3849 - empty username in url causes samba to use invalid username
Summary: empty username in url causes samba to use invalid username
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.23
Hardware: Other Windows XP
: P3 normal
Target Milestone: none
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
Depends on:
Reported: 2006-06-21 15:33 UTC by Joakim Plate
Modified: 2006-06-26 22:10 UTC (History)
0 users

See Also:

Fix for url parser (484 bytes, patch)
2006-06-21 15:34 UTC, Joakim Plate
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Plate 2006-06-21 15:33:25 UTC
urls like smb://:password@hostname/share, will invalidly consider password an username. 

this is due to next_token that is used to get the username. it consumes any leading spliting characters before looking for the next token. 

patch for url parser in libsmbclient provided, thou it might be a good idea to look over all uses of next_token.
Comment 1 Joakim Plate 2006-06-21 15:34:01 UTC
Created attachment 1976 [details]
Fix for url parser
Comment 2 Derrell Lipman 2006-06-26 22:10:37 UTC
Thanks for the report!

I added a new function to retrieve the next token without trimming leading separator characters.  This is fixed by check-ins 16552 (Samba3 branch) and 16553 (trunk).  Pleae let me know if you still see any problems.