Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-34585 fix broken blog file access control

  • Loading branch information...
commit 3a933cdf101226f5ea5bd90d1567535ee23828dc 1 parent 02814bf
Petr Skoda skodak authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 lib/filelib.php
6 lib/filelib.php
@@ -3471,15 +3471,15 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
3471 3471 }
3472 3472 }
3473 3473
3474   - if ('publishstate' === 'public') {
  3474 + if ($entry->publishstate === 'public') {
3475 3475 if ($CFG->forcelogin) {
3476 3476 require_login();
3477 3477 }
3478 3478
3479   - } else if ('publishstate' === 'site') {
  3479 + } else if ($entry->publishstate === 'site') {
3480 3480 require_login();
3481 3481 //ok
3482   - } else if ('publishstate' === 'draft') {
  3482 + } else if ($entry->publishstate === 'draft') {
3483 3483 require_login();
3484 3484 if ($USER->id != $entry->userid) {
3485 3485 send_file_not_found();

0 comments on commit 3a933cd

Please sign in to comment.
Something went wrong with that request. Please try again.