Commit Graph

279 Commits

Author SHA1 Message Date
Senthil Kumaran
75d7b615ba Prevent HTTPoxy attack (CVE-2016-1000110)
Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
indicates that the script is in CGI mode.

Issue reported and patch contributed by Rémi Rampin.
2016-07-30 05:49:53 -07:00
Senthil Kumaran
b5a67dec98 Closes issue26960.
Backport issue16270: Fix for urllib hanging with ftp urls.
2016-05-10 01:12:55 -07:00
Martin Panter
064ee4d28c Issue #26864: Fix case insensitivity and suffix comparison with no_proxy
Patch by Xiang Zhang.
2016-04-30 01:03:40 +00:00
Senthil Kumaran
b31c87bfcf backport fix for Issue #26804.
urllib.request will prefer lower_case proxy environment variables over
UPPER_CASE or Mixed_Case ones.
2016-04-25 09:17:54 -07:00
Martin Panter
ade4097671 Issue #12923: Reset FancyURLopener's redirect counter even on exception
Based on patches by Brian Brazil and Daniel Rocco.
2016-02-04 06:01:35 +00:00
Serhiy Storchaka
1aa2c0f073 Issue #23865: close() methods in multiple modules now are idempotent and more
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:24:10 +03:00
Victor Stinner
5ab1c01bfd Issue #23881: urllib.ftpwrapper constructor now closes the socket if the FTP
connection failed.
2015-04-07 12:47:57 +02:00
Benjamin Peterson
b206473ef8 give urllib.urlopen a context parameter (closes #22927) 2014-11-23 20:55:24 -06:00
Serhiy Storchaka
326b5ab05a Issue #20270: urllib and urlparse now support empty ports. 2014-01-18 18:30:09 +02:00
Senthil Kumaran
964c25f1d9 Fix #17967 - Fix related to regression on Windows.
os.path.join(*self.dirs) produces an invalid path on windows.
ftp paths are always forward-slash seperated like this. /pub/dir.
2013-06-02 11:59:09 -07:00
Senthil Kumaran
7351b66eb9 Fix thishost helper funtion in urllib. Returns the ipaddress of localhost when
hostname is resolvable by socket.gethostname for local machine. This all fixes
certain freebsd builtbot failures.
2013-06-01 11:11:30 -07:00
Senthil Kumaran
243cb807e9 Fix #17967: For ftp urls CWD to target instead of hopping to each directory
towards target. This fixes a bug where target is accessible, but parent
directories are restricted.
2013-06-01 08:24:31 -07:00
Serhiy Storchaka
923baea9f9 Issue #1285086: Get rid of the refcounting hack and speed up urllib.unquote(). 2013-03-14 21:31:09 +02:00
Senthil Kumaran
4c59211bd5 Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199 2012-03-15 13:24:40 -07:00
Senthil Kumaran
58c6062068 Fix Issue6631 - Disallow relative files paths in urllib*.open() 2012-01-21 11:43:02 +08:00
Senthil Kumaran
bcd833f30f - Issue #13642: Unquote before b64encoding user:password during Basic
Authentication. Patch contributed by Joonas Kuorilehto and Michele Orrù.
2012-01-11 00:09:24 +08:00
Charles-François Natali
f3d35f0efe Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
2011-12-18 15:52:48 +01:00
Senthil Kumaran
87e585581d Port to 2.7 - issue 10817 - Fix urlretrieve function to raise
ContentTooShortError even when reporthook is None. Patch by Jyrki Pulliainen.
2011-11-01 02:44:45 +08:00
Senthil Kumaran
ef651ac162 whitespace fix. 2011-08-07 10:03:58 +08:00
Senthil Kumaran
351950fbfc Remove the old dead test program within the module in 2.7. 2011-08-07 10:02:49 +08:00
Senthil Kumaran
b5bd4c88b5 Fix closes issue12698 - make the no_proxy environment variable handling a bit lenient (accomodate spaces in between the items) 2011-08-06 12:24:33 +08:00
Nadeem Vawda
a620facc1f Fix typo in dbf1e1a27427 that was causing some buildbots to fail. 2011-07-23 17:04:42 +02:00
Nadeem Vawda
b42c53e442 Issue #10883: Fix socket leaks in urllib.request.
* ftpwrapper now uses reference counting to ensure that the underlying socket
  is closed when the ftpwrapper object is no longer in use
* ftplib.FTP.ntransfercmd() now closes the socket if an error occurs

Initial patch by Victor Stinner.
2011-07-23 15:51:16 +02:00
Guido van Rossum
07ef62c47c Merge issue 11662 from 2.6. 2011-03-29 12:53:55 -07:00
Guido van Rossum
079381d236 Merge issue 11662 from 2.5. 2011-03-29 12:51:16 -07:00