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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
1dd2c3c9
Commit
1dd2c3c9
authored
Jun 18, 2023
by
Jérome Perrin
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Security: fix some typos
parent
7971024f
Changes
1
Hide 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 @
1dd2c3c9
...
@@ -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