From: moodler Date: Wed, 18 Aug 2004 05:47:55 +0000 (+0000) Subject: Remove possible path disclosure and add a translatable error message X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5e98103bd05d97e322656af106b2d939864d0705;p=moodle.git Remove possible path disclosure and add a translatable error message --- diff --git a/file.php b/file.php index f5c7d622c5..466b9f0ef4 100644 --- a/file.php +++ b/file.php @@ -91,8 +91,7 @@ } } } else { - error("Sorry, but the file you are looking for was not found ($pathname)", - "$CFG->wwwroot/course/view.php?id=$courseid"); + error(get_string("filenotfound", "error"), "$CFG->wwwroot/course/view.php?id=$courseid"); } exit; diff --git a/lang/en/error.php b/lang/en/error.php index 3f0c9ba33d..388f4fc29c 100755 --- a/lang/en/error.php +++ b/lang/en/error.php @@ -4,6 +4,7 @@ $string['coursegroupunknown'] = 'Course corresponding to group $a not specified'; $string['erroronline'] = 'Error on line $a'; $string['fieldrequired'] = '\"$a\" is a required field'; +$string['filenotfound'] = 'Sorry, the requested file could not be found'; $string['groupalready'] = 'User already belongs to group $a'; $string['groupunknown'] = 'Group $a not associated to specified course'; $string['invalidfieldname'] = '\"$a\" is not a valid field name';