From ab0939e5e5449cba04b02fff3a5595f725bce0a0 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 28 Sep 2014 17:53:49 -0700 Subject: Fix bug #68089 - do not accept options with embedded \0 Conflicts: ext/curl/interface.c --- ext/curl/interface.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/curl/interface.c') diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8915625047..23b125238d 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -170,6 +170,12 @@ static int php_curl_option_url(php_curl *ch, const char *url, const int len TSRM #if LIBCURL_VERSION_NUM < 0x071100 char *copystr = NULL; #endif + + if (strlen(url) != len) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Curl option contains invalid characters (\\0)"); + return 0; + } + /* Disable file:// if open_basedir are used */ if (PG(open_basedir) && *PG(open_basedir)) { #if LIBCURL_VERSION_NUM >= 0x071304 -- cgit v1.2.1 From 0e985d372692e13b9b777b5eae5572e028f1d96a Mon Sep 17 00:00:00 2001 From: Chris Christoff Date: Fri, 5 Dec 2014 15:59:46 -0500 Subject: Revert unintentional docblock change Revert unintentional docblock change It looks like commit dd8e59da8f5aafd9d77a0f1f17e5e272d09f643f introduced an unintended docbloc change. I have reverted this change in this commit. --- ext/curl/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/curl/interface.c') diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 23b125238d..0423f71f9a 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -10,7 +10,7 @@ | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you 6 copy immediately. | + | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sterling Hughes | +----------------------------------------------------------------------+ -- cgit v1.2.1