Permalink
Browse files

Security fix to disallow guest uploading

  • Loading branch information...
1 parent 00178c8 commit 890c016ac015cc003a015d2b328bd0f696aaff0b fiedorow committed Jun 16, 2005
Showing with 5 additions and 0 deletions.
  1. +1 −0 lang/en/assignment.php
  2. +4 −0 mod/assignment/type/uploadsingle/assignment.class.php
View
1 lang/en/assignment.php
@@ -41,6 +41,7 @@
$string['feedback'] = 'Feedback';
$string['feedbackfromteacher'] = 'Feedback from the $a';
$string['feedbackupdated'] = 'Submissions feedback updated for $a people';
+$string['guestnoupload'] = 'Sorry, guests are not allowed to upload.';
$string['helpoffline'] = '<p>This is useful when the assignment is performed outside of Moodle. It could be
something elsewhere on the web or face-to-face.</p><p>Students can see a description of the assignment,
but can\'t upload files or anything. Grading works normally, and students will get notifications of
View
4 mod/assignment/type/uploadsingle/assignment.class.php
@@ -57,6 +57,10 @@ function view_upload_form() {
function upload() {
global $CFG, $USER;
+ if (isguest($USER->id)) {
+ error(get_string('guestnoupload','assignment'));
+ }
+
$this->view_header(get_string('upload'));
if (!$this->isopen()) {

0 comments on commit 890c016

Please sign in to comment.