check that source is some sort of url

git-svn-id: file:///home/shish/svn/shimmie2/trunk@432 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-08-06 18:45:27 +00:00
parent 4d626b59e5
commit e6d3bb0e13

View File

@ -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
*/