From 7ba0b1b75ca2b3ff720f7ddf0e03db882a65353d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 1 Apr 2012 11:36:16 -0700 Subject: Restrict valid urls to having a http:// or https:// prefix. Fixes #1830. --- modules/gallery/helpers/MY_valid.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/gallery/helpers/MY_valid.php (limited to 'modules/gallery/helpers/MY_valid.php') diff --git a/modules/gallery/helpers/MY_valid.php b/modules/gallery/helpers/MY_valid.php new file mode 100644 index 00000000..68712302 --- /dev/null +++ b/modules/gallery/helpers/MY_valid.php @@ -0,0 +1,26 @@ + Date: Sun, 1 Apr 2012 14:09:08 -0700 Subject: "public static" -> "static" --- modules/gallery/helpers/MY_valid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers/MY_valid.php') diff --git a/modules/gallery/helpers/MY_valid.php b/modules/gallery/helpers/MY_valid.php index 68712302..ee17267a 100644 --- a/modules/gallery/helpers/MY_valid.php +++ b/modules/gallery/helpers/MY_valid.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class valid extends valid_Core { - public static function url($url) { + static function url($url) { return valid_Core::url($url) && (!strncasecmp($url, "http://", strlen("http://")) || !strncasecmp($url, "https://", strlen("https://"))); -- cgit v1.2.3