Skip to content
Snippets Groups Projects
Commit 58789954 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

correctly check hash parameter in media dispatcher FS#2648

parent aa4702d3
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,7 @@ function checkFileStatus(&$media, &$file, $rev='') {
//media to local file
if(preg_match('#^(https?)://#i',$media)){
//check hash
if(substr(md5(auth_cookiesalt().$media),0,6) != $INPUT->str('hash')){
if(substr(md5(auth_cookiesalt().$media),0,6) !== $INPUT->str('hash')){
return array( 412, 'Precondition Failed');
}
//handle external images
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment