From 69a791b831711a3bb3b3ed3c08ee30f0ff7ee3df Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 27 Sep 2004 12:50:23 +0000 Subject: [PATCH] Do safety check on $auth pathname before doing include. Thanks, Petr Skoda! --- lib/moodlelib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index a99a8e79cfa..cd6ecaf589f 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -821,6 +821,10 @@ function authenticate_user_login($username, $password) { $auth = $user->auth; } + if (detect_munged_arguments($auth, 0)) { // For safety on the next require + return false; + } + if (!file_exists("$CFG->dirroot/auth/$auth/lib.php")) { $auth = "manual"; // Can't find auth module, default to internal }