summaryrefslogtreecommitdiff
path: root/inc/fetch.functions.php
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-08-03 10:44:54 +0200
committerKlap-in <klapinklapin@gmail.com>2013-08-03 10:44:54 +0200
commit6acfab8732e1784b953c8cc2ae7408f84fda7ce8 (patch)
tree01e6ac38df46c9ad18f058c8d597617702eb67f3 /inc/fetch.functions.php
parent51bd6f039e782dca456022514893aa80bd7c52b9 (diff)
parentcab505616ec9b8ef3cd671e7337c91d065745932 (diff)
downloadrpg-6acfab8732e1784b953c8cc2ae7408f84fda7ce8.tar.gz
rpg-6acfab8732e1784b953c8cc2ae7408f84fda7ce8.tar.bz2
Merge remote-tracking branch 'origin/master' into changelogtestsonly
Diffstat (limited to 'inc/fetch.functions.php')
-rw-r--r--inc/fetch.functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php
index 53ade3555..207ad9e5f 100644
--- a/inc/fetch.functions.php
+++ b/inc/fetch.functions.php
@@ -101,8 +101,8 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
//media to local file
if(media_isexternal($media)) {
- //check hash
- if(substr(PassHash::hmac('md5', $media, auth_cookiesalt()), 0, 6) !== $INPUT->str('hash')) {
+ //check token for external image and additional for resized and cached images
+ if(media_get_token($media, $width, $height) !== $INPUT->str('tok')) {
return array(412, 'Precondition Failed');
}
//handle external images