Skip to content

Commit a9b4c52

Browse files
committed
fix: do not let users export forbidden images
Setting `$file` to empty is neccessary, but was later overwritten if `$local` is set. This allowed users to export images in pdfs that they were not allowed to see otherwise.
1 parent 9df5903 commit a9b4c52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

DokuImageProcessorDecorator.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ public static function adjustGetImageLinks($file, $orig_srcpath) {
6464
//check permissions (namespace only)
6565
if(auth_quickaclcheck(getNS($media) . ':X') < AUTH_READ) {
6666
$file = '';
67+
$local = '';
68+
} else {
69+
$local = mediaFN($media, $rev);
6770
}
68-
$local = mediaFN($media, $rev);
6971
}
7072

7173
//handle image resizing/cropping

0 commit comments

Comments
 (0)