bleh, source validation. Anything is allowed and it's only linked on output if appropriate
This commit is contained in:
parent
893afe5b61
commit
7a6ef55114
@ -298,11 +298,6 @@ class ImageIO extends Extension {
|
|||||||
if(strlen(trim($image->source)) == 0) {
|
if(strlen(trim($image->source)) == 0) {
|
||||||
$image->source = null;
|
$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
|
* Check for an existing image
|
||||||
@ -431,12 +426,6 @@ class ImageIO extends Extension {
|
|||||||
if(strlen(trim($image->source)) == 0) {
|
if(strlen(trim($image->source)) == 0) {
|
||||||
$image->source = $existing->get_source();
|
$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
|
This step could be optional, ie: perhaps move the image somewhere
|
||||||
|
Loading…
x
Reference in New Issue
Block a user