diff options
author | Klap-in <klapinklapin@gmail.com> | 2013-07-21 23:10:32 +0200 |
---|---|---|
committer | Klap-in <klapinklapin@gmail.com> | 2013-07-21 23:10:32 +0200 |
commit | b1ffadaa6963bbf83e61917c31e04c04c421ce9e (patch) | |
tree | f9a1391d2ee6536473b1672e249c1b11a67a5b0e /inc/fetch.functions.php | |
parent | fa3ed26bfbafa4d05ec77a799259d4a46baadd9a (diff) | |
parent | fbd8067eeeb9f424981aad8b283e17f734c738c3 (diff) | |
download | dokuwiki-b1ffadaa6963bbf83e61917c31e04c04c421ce9e.tar.gz dokuwiki-b1ffadaa6963bbf83e61917c31e04c04c421ce9e.zip |
Merge remote-tracking branch 'origin/master' into fetchimagetokexternal
Diffstat (limited to 'inc/fetch.functions.php')
-rw-r--r-- | inc/fetch.functions.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index e5411786c..3c700b35b 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -89,15 +89,18 @@ function sendFile($file, $mime, $dl, $cache, $public = false) { * WRITE: MEDIA, FILE, array( STATUS, STATUSMESSAGE ) * * @author Gerry Weissbach <gerry.w@gammaproduction.de> - * @param $media reference to the media id - * @param $file reference to the file variable - * @returns array(STATUS, STATUSMESSAGE) + * @param string $media reference to the media id + * @param string $file reference to the file variable + * @param string $rev + * @param int $width + * @param int $height + * @return array(STATUS, STATUSMESSAGE) */ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) { global $MIME, $EXT, $CACHE, $INPUT; //media to local file - if(preg_match('#^(https?)://#i', $media)) { + if(media_isexternal($media)) { //check hash if(substr(PassHash::hmac('md5', $media, auth_cookiesalt()), 0, 6) !== $INPUT->str('hash')) { return array(412, 'Precondition Failed'); |