Skip to content

Commit

Permalink
MDL-16596 always force download of draft files - this prevents proble…
Browse files Browse the repository at this point in the history
…ms when editing area with file suploaded by otehr users
  • Loading branch information
skodak committed Sep 21, 2008
1 parent ae6bc29 commit ac84a07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions draftfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
disable_debugging();

$relativepath = get_file_argument('draftfile.php');
$forcedownload = optional_param('forcedownload', 0, PARAM_BOOL);

// relative path must start with '/'
if (!$relativepath) {
Expand Down Expand Up @@ -64,4 +63,4 @@
// finally send the file
// ========================================
session_write_close(); // unlock session during fileserving
send_stored_file($file, 0, false, $forcedownload);
send_stored_file($file, 0, false, true); // force download - security first!

0 comments on commit ac84a07

Please sign in to comment.