From 7a6ef551147553ee2af34fe2f3ae4a025e52863b Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 25 Mar 2012 04:45:47 +0100 Subject: [PATCH] bleh, source validation. Anything is allowed and it's only linked on output if appropriate --- ext/image/main.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ext/image/main.php b/ext/image/main.php index a43ffcf7..ca902f4c 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -298,11 +298,6 @@ class ImageIO extends Extension { if(strlen(trim($image->source)) == 0) { $image->source = null; } - if(!empty($image->source)) { - if(!preg_match("#^(https?|ftp)://#", $image->source)) { - throw new ImageAdditionException("Image's source isn't a valid URL"); - } - } /* * Check for an existing image @@ -431,12 +426,6 @@ class ImageIO extends Extension { if(strlen(trim($image->source)) == 0) { $image->source = $existing->get_source(); } - if(!empty($image->source)) { - if(!preg_match("#^(https?|ftp)://#", $image->source)) { - $h_url = html_escape($image->source); - throw new ImageReplaceException("Image's source isn't a valid URL ($h_url)"); - } - } /* This step could be optional, ie: perhaps move the image somewhere