diff --git a/ext/image/main.php b/ext/image/main.php index e0c30ce3..a888f357 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -167,6 +167,16 @@ class ImageIO extends Extension { global $database; global $config; + /* + * Validate things + */ + if(!empty($image->source)) { + if(!preg_match("#^(https?|ftp)://#", $image->source)) { + $error = "Image's source isn't a valid URL"; + return $error; + } + } + /* * Check for an existing image */