Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flask-simpleldap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
flask-simpleldap
Commits
71793eed
Commit
71793eed
authored
10 years ago
by
admiralobvious
Browse files
Options
Downloads
Patches
Plain Diff
Make sure we check for lower AND upper case prefix
Fixes #3.
parent
424e8e1c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/index.rst
+15
-0
15 additions, 0 deletions
docs/index.rst
flask_simpleldap/__init__.py
+1
-1
1 addition, 1 deletion
flask_simpleldap/__init__.py
with
16 additions
and
1 deletion
docs/index.rst
+
15
−
0
View file @
71793eed
...
@@ -95,3 +95,18 @@ Classes
...
@@ -95,3 +95,18 @@ Classes
.. autoclass:: flask_simpleldap.LDAP
.. autoclass:: flask_simpleldap.LDAP
:members:
:members:
History
-------
Changes:
- 0.1.1: September 6, 2014
- Fix GitHub issue `#3<https://github.com/admiralobvious/flask-simpleldap/issues/3>`_,
Not compatible with uppercase distinguished names.
- 0.1: August 9, 2014
- Initial Release
\ No newline at end of file
This diff is collapsed.
Click to expand it.
flask_simpleldap/__init__.py
+
1
−
1
View file @
71793eed
...
@@ -188,7 +188,7 @@ class LDAP(object):
...
@@ -188,7 +188,7 @@ class LDAP(object):
if
records
:
if
records
:
if
current_app
.
config
[
'
LDAP_USER_GROUPS_FIELD
'
]
in
records
[
0
][
1
]:
if
current_app
.
config
[
'
LDAP_USER_GROUPS_FIELD
'
]
in
records
[
0
][
1
]:
groups
=
records
[
0
][
1
][
current_app
.
config
[
'
LDAP_USER_GROUPS_FIELD
'
]]
groups
=
records
[
0
][
1
][
current_app
.
config
[
'
LDAP_USER_GROUPS_FIELD
'
]]
result
=
[
re
.
findall
(
'
cn=
(.*?),
'
,
group
)[
0
]
for
group
in
groups
]
result
=
[
re
.
findall
(
'
(?:cn=|CN=)
(.*?),
'
,
group
)[
0
]
for
group
in
groups
]
return
result
return
result
except
ldap
.
LDAPError
as
e
:
except
ldap
.
LDAPError
as
e
:
raise
LDAPException
(
self
.
error
(
e
))
raise
LDAPException
(
self
.
error
(
e
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment