Fix bug when authenticating using user:password@url syntax (#912358)

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2013-07-12 09:01:01 +02:00
parent 5f096ed82a
commit 67958755aa
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From 8760123cee87e07a276b8b13ef48ada3a490ad47 Mon Sep 17 00:00:00 2001
From: Tomas Hozza <thozza@redhat.com>
Date: Thu, 11 Jul 2013 11:22:43 +0000
Subject: Set sock variable to -1 if no persistent conn exists
Wget should set sock variable to -1 if no persistent
connection exists. Function persistent_available_p()
tests persistent connection but if test_socket_open()
fails it closes the socket but will not set sock variable
to -1. After returning from persistent_available_p()
it is possible that sock has still value of already
closed connection.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
---
diff --git a/src/http.c b/src/http.c
index 669f0fe..a693355 100644
--- a/src/http.c
+++ b/src/http.c
@@ -1983,6 +1983,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
exec_name, quote (relevant->host));
return HOSTERR;
}
+ else if (sock != -1)
+ {
+ sock = -1;
+ }
}
if (sock < 0)
--
cgit v0.9.0.2

View File

@ -16,6 +16,7 @@ Patch6: wget-1.14-texi2pod_error_perl518.patch
Patch7: wget-1.14-fix-double-free-of-iri-orig_url.patch
Patch8: wget-1.14-Fix-deadcode-and-possible-NULL-use.patch
Patch9: wget-1.14-doc-missing-opts-and-fix-preserve-permissions.patch
Patch10: wget-1.14-set_sock_to_-1_if_no_persistent_conn.patch
Provides: webclient
Provides: bundled(gnulib)
@ -44,6 +45,7 @@ support for Proxy servers, and configurability.
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
if pkg-config openssl ; then
@ -84,6 +86,7 @@ rm -rf $RPM_BUILD_ROOT
- Fix deadcode and possible use of NULL in vprintf (#913153)
- Add documentation for --regex-type and --preserve-permissions
- Fix --preserve-permissions to work as documented (and expected)
- Fix bug when authenticating using user:password@url syntax (#912358)
* Wed Jul 10 2013 Tomas Hozza <thozza@redhat.com> - 1.14-7
- Fix double free of iri->orig_url (#981778)