Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
f3dc7d8b
Commit
f3dc7d8b
authored
May 11, 2022
by
Yusei Tahara
Committed by
Vincent Pelletier
Sep 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Security: Do not call notifyLoginFailure multiple times.
parent
e9531ee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
product/ERP5Security/ERP5LoginUserManager.py
product/ERP5Security/ERP5LoginUserManager.py
+6
-1
No files found.
product/ERP5Security/ERP5LoginUserManager.py
View file @
f3dc7d8b
...
...
@@ -27,6 +27,7 @@
##############################################################################
from
functools
import
partial
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.AuthEncoding
import
pw_validate
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
...
...
@@ -132,7 +133,11 @@ class ERP5LoginUserManager(BasePlugin):
or
login_password
is
None
or
not
pw_validate
(
login_password
,
password
)):
if
is_authentication_policy_enabled
:
login_value
.
notifyLoginFailure
()
tv
=
getTransactionalVariable
()
login_failure_key
=
'notified_login_failure_'
+
login_value
.
getRelativeUrl
()
if
tv
.
get
(
login_failure_key
)
is
None
:
login_value
.
notifyLoginFailure
()
tv
[
login_failure_key
]
=
1
return
if
is_authentication_policy_enabled
:
if
login_value
.
isPasswordExpired
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment