Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea76b65
)
MDL-46201 events: Sanitization of username before returning the description.
author
Adrian Greeve
<adrian@moodle.com>
Tue, 1 Jul 2014 05:46:25 +0000
(13:46 +0800)
committer
Dan Poltawski
<dan@moodle.com>
Mon, 7 Jul 2014 17:18:45 +0000
(18:18 +0100)
lib/classes/event/user_login_failed.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/classes/event/user_login_failed.php
b/lib/classes/event/user_login_failed.php
index
cc1d1a2
..
8c8d20a
100644
(file)
--- a/
lib/classes/event/user_login_failed.php
+++ b/
lib/classes/event/user_login_failed.php
@@
-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']}'.";
}
/**