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
Klaus Wölfel
erp5
Commits
36d7f81e
Commit
36d7f81e
authored
Jun 18, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Security: fix some typos
parent
831627bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
product/ERP5Security/ERP5KeyAuthPlugin.py
product/ERP5Security/ERP5KeyAuthPlugin.py
+7
-7
No files found.
product/ERP5Security/ERP5KeyAuthPlugin.py
View file @
36d7f81e
...
@@ -151,7 +151,7 @@ def addERP5KeyAuthPlugin(dispatcher, id, title=None,
...
@@ -151,7 +151,7 @@ def addERP5KeyAuthPlugin(dispatcher, id, title=None,
class
ERP5KeyAuthPlugin
(
ERP5UserManager
,
CookieAuthHelper
):
class
ERP5KeyAuthPlugin
(
ERP5UserManager
,
CookieAuthHelper
):
"""
"""
Key authenti
fi
cation PAS plugin which support key authentication in URL.
Key authentication PAS plugin which support key authentication in URL.
<ERP5_Root>/web_page_module/1?__ac_key=207221200213146153166
<ERP5_Root>/web_page_module/1?__ac_key=207221200213146153166
...
@@ -309,7 +309,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
...
@@ -309,7 +309,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
################################
################################
security
.
declarePrivate
(
'resetCredentials'
)
security
.
declarePrivate
(
'resetCredentials'
)
def
resetCredentials
(
self
,
request
,
response
):
def
resetCredentials
(
self
,
request
,
response
):
"""Expire cookies of authenti
fi
cation """
"""Expire cookies of authentication """
response
.
expireCookie
(
self
.
cookie_name
,
path
=
'/'
)
response
.
expireCookie
(
self
.
cookie_name
,
path
=
'/'
)
response
.
expireCookie
(
self
.
default_cookie_name
,
path
=
'/'
)
response
.
expireCookie
(
self
.
default_cookie_name
,
path
=
'/'
)
...
@@ -319,7 +319,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
...
@@ -319,7 +319,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
################################
################################
security
.
declarePrivate
(
'authenticateCredentials'
)
security
.
declarePrivate
(
'authenticateCredentials'
)
def
authenticateCredentials
(
self
,
credentials
):
def
authenticateCredentials
(
self
,
credentials
):
"""Authenti
fi
cate with credentials"""
"""Authenticate with credentials"""
key
=
credentials
.
get
(
'key'
,
None
)
key
=
credentials
.
get
(
'key'
,
None
)
if
key
!=
None
:
if
key
!=
None
:
login
=
self
.
decrypt
(
key
)
login
=
self
.
decrypt
(
key
)
...
@@ -377,9 +377,9 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
...
@@ -377,9 +377,9 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
LOG
(
'ERP5KeyAuthPlugin.authenticateCredentials'
,
PROBLEM
,
str
(
e
))
LOG
(
'ERP5KeyAuthPlugin.authenticateCredentials'
,
PROBLEM
,
str
(
e
))
return
None
return
None
################################
################################
#
# Properties for ZMI managment #
# Properties for ZMI manag
e
ment #
################################
################################
#
#'Edit' option form
#'Edit' option form
manage_editERP5KeyAuthPluginForm
=
PageTemplateFile
(
manage_editERP5KeyAuthPluginForm
=
PageTemplateFile
(
...
@@ -393,7 +393,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
...
@@ -393,7 +393,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
"""Edit the object"""
"""Edit the object"""
error_message
=
''
error_message
=
''
#Test param
a
eters
#Test parameters
if
"__ac_key"
in
[
cookie_name
,
default_cookie_name
]:
if
"__ac_key"
in
[
cookie_name
,
default_cookie_name
]:
raise
ValueError
(
"Cookie name must be different of __ac_key"
)
raise
ValueError
(
"Cookie name must be different of __ac_key"
)
...
...
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