MDL-46201 events: Sanitization of username before returning the description.
This commit is contained in:
committed by
Dan Poltawski
parent
ea76b652fc
commit
005402f503
@@ -68,7 +68,9 @@ class user_login_failed extends base {
|
||||
* @return string
|
||||
*/
|
||||
public function get_description() {
|
||||
return "Login failed for the username '{$this->other['username']}' for the reason with id '{$this->other['reason']}'.";
|
||||
// Note that username could be any random user input.
|
||||
$username = s($this->other['username']);
|
||||
return "Login failed for the username '{$username}' for the reason with id '{$this->other['reason']}'.";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user