Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intranet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Colisson
intranet
Commits
fdf52bee
Commit
fdf52bee
authored
Nov 25, 2014
by
Pierre-Elliott Bécue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parfois, l'username vaut none, et .lower ne marche pas.
parent
06d93a92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
cas_login.py
cas_login.py
+3
-2
No files found.
cas_login.py
View file @
fdf52bee
...
...
@@ -41,12 +41,13 @@ class CransCASBackend(CASBackend):
utilisateur django s'il n'existe pas encore."""
username
,
attributes
=
_verify
(
ticket
,
service
)
# Si _verify plante, username contient None.
if
username
is
None
or
not
username
:
return
None
# Sanitize username
username
=
username
.
lower
()
if
attributes
:
request
.
session
[
'attributes'
]
=
attributes
if
not
username
:
return
None
try
:
user
=
User
.
objects
.
get
(
username
=
username
)
except
User
.
DoesNotExist
:
...
...
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