From e33c82d62e5a56b2fe46096420de838eb74553e8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 15:18:31 +0300 Subject: Merge pull request #4758 from butane/uri_scheme_case URI schemes are not case-sensitive --- system/libraries/Form_validation.php | 2 +- system/libraries/Trackback.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 25dc0d41e..61f0298fd 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; } diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index a9b256464..7222c00c2 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 (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index f965858e2..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($url, 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } -- cgit v1.2.3-24-g4f1b