Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ca275208
Commit
ca275208
authored
Jul 23, 1999
by
Christopher Petrilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Seperated out password management issues into a new file.
parent
c33e5bbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
22 deletions
+5
-22
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+5
-22
No files found.
lib/python/AccessControl/User.py
View file @
ca275208
...
...
@@ -84,9 +84,9 @@
##############################################################################
"""Access control package"""
__version__
=
'$Revision: 1.8
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.8
7
$'
[
11
:
-
2
]
import
Globals
,
App
.
Undo
,
socket
,
regex
,
binascii
,
sha
import
Globals
,
App
.
Undo
,
socket
,
regex
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
from
string
import
join
,
strip
,
split
,
lower
from
App.Management
import
Navigation
,
Tabs
...
...
@@ -97,18 +97,9 @@ from App.ImageFile import ImageFile
from
Role
import
RoleManager
from
string
import
split
,
join
,
upper
from
PermissionRole
import
_what_not_even_god_should_do
,
rolesForPermissionOn
from
AuthEncoding
import
pw_validate
# Bogosity on various platforms due to ITAR restrictions
try
:
import
crypt
except
ImportError
:
crypt
=
None
ListType
=
type
([])
NotImplemented
=
'NotImplemented'
...
...
@@ -168,16 +159,8 @@ class BasicUser(Implicit):
def
authenticate
(
self
,
password
,
request
):
passwrd
=
self
.
_getPassword
()
result
=
0
if
upper
(
passwrd
[:
5
])
==
'{SHA}'
:
password
=
binascii
.
b2a_base64
(
sha
.
new
(
password
).
digest
())[:
-
1
]
result
=
passwrd
[
5
:]
==
password
elif
upper
(
passwrd
[:
7
])
==
'{CRYPT}'
and
crypt
is
not
None
:
#if crypt is None, it's not compiled in and everything will fail
password
=
crypt
(
password
,
passwrd
[
7
:
9
])
result
=
passwrd
[
7
:]
==
password
else
:
result
=
passwrd
==
password
result
=
pw_validate
(
passwrd
,
password
)
domains
=
self
.
getDomains
()
if
domains
:
...
...
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