Adds additional CmdNewPassword() checks and tests.
This commit is contained in:
parent
54213ab614
commit
e99330a445
2 changed files with 4 additions and 0 deletions
|
|
@ -25,6 +25,8 @@ AUDIT_MASKS = [
|
|||
{'create': r"^[^@]?[create]{5,6}\s+(\w+|\".+?\")\s+(?P<secret>[\w]+)"},
|
||||
{'create': r"^[^@]?[create]{5,6}\s+(?P<secret>[\w]+)"},
|
||||
{'userpassword': r"^[@\s]*[userpassword]{11,14}\s+(\w+|\".+?\")\s+=*\s*(?P<secret>[\w]+)"},
|
||||
{'userpassword': r"^.*new password set to '(?P<secret>[^']+)'\."},
|
||||
{'userpassword': r"^.* has changed your password to '(?P<secret>[^']+)'\."},
|
||||
{'password': r"^[@\s]*[password]{6,9}\s+(?P<secret>.*)"},
|
||||
] + getattr(ev_settings, 'AUDIT_MASKS', [])
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ class AuditingTest(EvenniaTest):
|
|||
self.assertEqual(self.session.mask(cmd), cmd)
|
||||
|
||||
unsafe_cmds = (
|
||||
("something - new password set to 'asdfghjk'.", "something - new password set to '********'."),
|
||||
("someone has changed your password to 'something'.", "someone has changed your password to '*********'."),
|
||||
('connect johnny password123', 'connect johnny ***********'),
|
||||
('concnct johnny password123', 'concnct johnny ***********'),
|
||||
('concnct johnnypassword123', 'concnct *****************'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue