Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/components/phpthumbof/model/phpthumbof.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function debugmsg($msg, $phpthumbDebug = FALSE) {


/*
* Create a thumnail from $src with $options
* Create a thumbnail from $src with $options
* $src can be a path/filename or URL and absolute or relative
* Returns the filename of the cached image on success or $src on failure
*/
Expand All @@ -175,6 +175,9 @@ public function createThumbnail($src, $options) {
if ($this->config['cacheNotWritable']) {
return $output;
}
if (strtolower(pathinfo($src, PATHINFO_EXTENSION)) === 'svg') { // abort if file is SVG
return $output;
}
/* Find input file */
$isRemote = preg_match('/^(?:https?:)?\/\/((?:.+?)\.(?:.+?))\/(.+)/i', $src, $matches); // check for absolute URLs
if ($isRemote && $this->config['httpHost'] === strtolower($matches[1])) { // if it's the same server we're running on
Expand Down