From: Ilia Alshanetsky Date: Mon, 1 Nov 2004 04:56:10 +0000 (+0000) Subject: MFH: Fixed bug #30613 (Prevent infinite recursion in url redirection). X-Git-Tag: php-4.3.10RC1~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a451f1c9e4759167957226c87a73ce143336c770;p=php MFH: Fixed bug #30613 (Prevent infinite recursion in url redirection). --- diff --git a/NEWS b/NEWS index 04981f122b..c52eaf4ce9 100644 --- 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 diff --git a/ext/curl/curl.c b/ext/curl/curl.c index f06e7587ac..b0330c2678 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -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;