Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
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
Joshua
zodb
Commits
08cb0113
Commit
08cb0113
authored
Mar 30, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted test to ZEO.hash
parent
6e167885
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/ZEO/tests/auth_plaintext.py
src/ZEO/tests/auth_plaintext.py
+3
-3
No files found.
src/ZEO/tests/auth_plaintext.py
View file @
08cb0113
...
...
@@ -19,14 +19,14 @@ This mechanism offers *no network security at all*; the only security
is provided by not storing plaintext passwords on disk.
"""
import
sha
from
ZEO.hash
import
sha1
from
ZEO.StorageServer
import
ZEOStorage
from
ZEO.auth
import
register_module
from
ZEO.auth.base
import
Client
,
Database
def
session_key
(
username
,
realm
,
password
):
return
sha
.
new
(
"%s:%s:%s"
%
(
username
,
realm
,
password
)).
hexdigest
()
return
sha
1
(
"%s:%s:%s"
%
(
username
,
realm
,
password
)).
hexdigest
()
class
StorageClass
(
ZEOStorage
):
...
...
@@ -36,7 +36,7 @@ class StorageClass(ZEOStorage):
except
LookupError
:
return
0
password_dig
=
sha
.
new
(
password
).
hexdigest
()
password_dig
=
sha
1
(
password
).
hexdigest
()
if
dbpw
==
password_dig
:
self
.
connection
.
setSessionKey
(
session_key
(
username
,
self
.
database
.
realm
,
...
...
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