MDL-46201 events: Sanitization of username before returning the description.

This commit is contained in:
Adrian Greeve
2014-07-07 18:18:45 +01:00
committed by Dan Poltawski
parent ea76b652fc
commit 005402f503
+3 -1
View File
@@ -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']}'.";
}
/**