From ede64f33385e1117672fc18c34d52c7f788a3c28 Mon Sep 17 00:00:00 2001 From: Brendan Heywood Date: Tue, 21 Sep 2021 18:54:58 +1000 Subject: [PATCH] MDL-69958 auth: Handle well-known/change-password requests --- error/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/error/index.php b/error/index.php index 90363f3404d..e76e6b5cdc4 100644 --- a/error/index.php +++ b/error/index.php @@ -29,6 +29,12 @@ require('../config.php'); // phpcs:ignore +// Until we have a more robust routing api in place this is a very simple +// and clean way to handle arbitrary urls without a php extension. +if ($ME === '/.well-known/change-password') { + redirect(new moodle_url('/login/change_password.php')); +} + $context = context_system::instance(); $title = get_string('pagenotexisttitle', 'error'); $PAGE->set_url('/error/index.php');