bleh, source validation. Anything is allowed and it's only linked on output if appropriate
This commit is contained in:
parent
893afe5b61
commit
7a6ef55114
1 changed files with 0 additions and 11 deletions
|
@ -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
|
||||
|
|
Reference in a new issue