Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-34585 fix broken blog file access control

  • Loading branch information...
commit 3a933cdf101226f5ea5bd90d1567535ee23828dc 1 parent 02814bf
@skodak skodak authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/filelib.php
View
6 lib/filelib.php
@@ -3471,15 +3471,15 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
}
}
- if ('publishstate' === 'public') {
+ if ($entry->publishstate === 'public') {
if ($CFG->forcelogin) {
require_login();
}
- } else if ('publishstate' === 'site') {
+ } else if ($entry->publishstate === 'site') {
require_login();
//ok
- } else if ('publishstate' === 'draft') {
+ } else if ($entry->publishstate === 'draft') {
require_login();
if ($USER->id != $entry->userid) {
send_file_not_found();
Please sign in to comment.
Something went wrong with that request. Please try again.