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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
0920371a
Commit
0920371a
authored
May 20, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base/credential: fix password type ( use str )
parent
3d24a52a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
bt5/erp5_authentication_policy/TestTemplateItem/portal_components/test.erp5.testAuthenticationPolicy.py
...m/portal_components/test.erp5.testAuthenticationPolicy.py
+1
-1
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.EncryptedPasswordMixin.py
...em/portal_components/mixin.erp5.EncryptedPasswordMixin.py
+3
-1
bt5/erp5_dms_ui_test/SkinTemplateItem/portal_skins/erp5_dms_ui_test/PDF_getContentPassword.py
...m/portal_skins/erp5_dms_ui_test/PDF_getContentPassword.py
+1
-1
No files found.
bt5/erp5_authentication_policy/TestTemplateItem/portal_components/test.erp5.testAuthenticationPolicy.py
View file @
0920371a
...
...
@@ -263,7 +263,7 @@ class TestAuthenticationPolicy(ERP5TypeTestCase):
[
x
.
getPassword
()
for
x
in
self
.
_getPasswordEventList
(
login
)])
# other methods (edit)...
login
.
edit
(
password
=
'123456789-4'
)
login
.
edit
(
password
=
'123456789-4'
)
self
.
tic
()
old_password5
=
login
.
getPassword
()
self
.
assertSameSet
([
old_password5
,
old_password4
,
old_password3
,
old_password2
,
old_password1
,
old_password
],
\
...
...
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.EncryptedPasswordMixin.py
View file @
0920371a
...
...
@@ -36,10 +36,12 @@ from Acquisition import aq_base
from
Products.ERP5Type
import
Permissions
from
erp5.component.interface.IEncryptedPassword
import
IEncryptedPassword
from
Products.ERP5Type.Globals
import
PersistentMapping
from
Products.ERP5Type.Utils
import
bytes2str
from
Products.CMFCore.utils
import
_checkPermission
from
Products.CMFCore.exceptions
import
AccessControl_Unauthorized
from
six
import
string_types
as
basestring
@
zope
.
interface
.
implementer
(
IEncryptedPassword
,)
class
EncryptedPasswordMixin
(
object
):
"""Encrypted Password Mixin
...
...
@@ -103,7 +105,7 @@ class EncryptedPasswordMixin(object):
# workflows on this method.
self
.
password
=
PersistentMapping
()
if
value
:
self
.
_setEncodedPassword
(
pw_encrypt
(
value
))
self
.
_setEncodedPassword
(
bytes2str
(
pw_encrypt
(
value
)
))
def
_setPassword
(
self
,
value
):
self
.
checkPasswordValueAcceptable
(
value
)
...
...
bt5/erp5_dms_ui_test/SkinTemplateItem/portal_skins/erp5_dms_ui_test/PDF_getContentPassword.py
View file @
0920371a
# type: () ->
bytes
# type: () ->
str
if
context
.
getId
()
==
'test_ERP5_Logo_Encrypted_PDF'
:
return
'secret'
return
context
.
skinSuper
(
'erp5_dms_ui_test'
,
'PDF_getContentPassword'
)(
REQUEST
=
REQUEST
)
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