From 4e239a3913d161f560de9e20a3ef291ebf1c16fb Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Tue, 9 Aug 2016 22:34:42 +0530 Subject: URI schemes are not case sensitive Signed-off-by: Vivek Dinesh --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 04445f5b7..d5f67d1da 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1200,7 +1200,7 @@ class CI_Form_validation { { return FALSE; } - elseif ( ! in_array($matches[1], array('http', 'https'), TRUE)) + elseif ( ! in_array(strtolower($matches[1]), array('http', 'https'), TRUE)) { return FALSE; } -- cgit v1.2.3-24-g4f1b From fba242cf6bc99833c21fc3600fdff2691244e243 Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Tue, 9 Aug 2016 22:43:52 +0530 Subject: URI schemes are not case sensitive Signed-off-by: Vivek Dinesh --- system/libraries/Trackback.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index a9b256464..848f5b3c9 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -370,7 +370,7 @@ class CI_Trackback { { $url = trim($url); - if (strpos($url, 'http') !== 0) + if (strpos(strtolower($url), 'http') !== 0) { $url = 'http://'.$url; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index f965858e2..b01691ac2 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -352,7 +352,7 @@ class CI_Xmlrpc { */ public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080) { - if (strpos($url, 'http') !== 0) + if (strpos(strtolower($url), 'http') !== 0) { $url = 'http://'.$url; } -- cgit v1.2.3-24-g4f1b From 656fd7eef9624c3c07918b2d573d9ccb6f971c57 Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Wed, 10 Aug 2016 17:36:49 +0530 Subject: Better usage Based on GitHub discussion. Signed-off-by: Vivek Dinesh --- system/libraries/Trackback.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 848f5b3c9..7222c00c2 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -370,7 +370,7 @@ class CI_Trackback { { $url = trim($url); - if (strpos(strtolower($url), 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index b01691ac2..181a104d0 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -352,7 +352,7 @@ class CI_Xmlrpc { */ public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080) { - if (strpos(strtolower($url), 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } -- cgit v1.2.3-24-g4f1b