]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #30613 (Prevent infinite recursion in url redirection).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 1 Nov 2004 04:56:10 +0000 (04:56 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 1 Nov 2004 04:56:10 +0000 (04:56 +0000)
NEWS
ext/curl/curl.c

diff --git a/NEWS b/NEWS
index 04981f122beaee0f006d15baed9e8f9ca92256c5..c52eaf4ce9a60af7e91af6ce03d7ad16e5d10d30 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ PHP 4                                                                      NEWS
 - Fixed a bug in addslashes() handling of the '\0' character. (Ilia)
 - Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
 - Fixed potential problems with unserializing invalid serialize data. (Marcus)
+- Fixed bug #30613 (Prevent infinite recursion in url redirection). (Ilia)
 - Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
 - Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
 - Fixed bug #30388 (rename across filesystems loses ownership and
index f06e7587ac6b14b15fc4d4be04d5f3ac8a92c2f1..b0330c267875251ddee188a8f30789e35ad66c64 100644 (file)
@@ -708,6 +708,7 @@ PHP_FUNCTION(curl_init)
        curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER,       (void *) ch);
        curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
        curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
+       curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
 
        if (argc > 0) {
                char *urlcopy;