This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib.splituser(): '@' in usrname
Type: Stage:
Components: Extension Modules Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: gvanrossum, rhettinger, slyphon
Priority: normal Keywords: patch

Created on 2002-08-17 21:55 by slyphon, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
urllib.patch slyphon, 2002-08-17 21:55 a patch for urllib.py
Messages (3)
msg40962 - (view) Author: Jonathan Simms (slyphon) Date: 2002-08-17 21:55
This was in response to "[ 581529 ] bug in 
splituser(host) in urllib". This was a one-line 
change. The issue was that if a username contained 
the '@' symbol, the urllib.splituser(host) method 
wouldn't return the correct information.

if you were to try 
urllib.splituser(Jones@CrunchyFrog.net@Whizzo.com), 
you'd get ['Jones', 'CrunchyFrog.net@Whizzo.com']

after applying this patch, you get 
['Jones@CrunchyFrog.net', 'Whizzo.com']

So, there you are... :-)
msg40963 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-08-18 20:11
Logged In: YES 
user_id=80475

Applied as urllib.py 1.150 and 1.135.6.4
Closing patch and related bug.
msg40964 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-08-20 19:52
Logged In: YES 
user_id=6380

Fine, but I'm baffled that someone would try this. RFC1738 says:

"Within the user and password field, any ":", "@", or "/"
must be encoded."
History
Date User Action Args
2022-04-10 16:05:36adminsetgithub: 37051
2002-08-17 21:55:10slyphoncreate