Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
aceb897e
authored
Sep 09, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: eliminate security risk
parent
4d63a446
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
+1
-6
circle/common/backends.py
+1
-6
No files found.
circle/common/backends.py
View file @
aceb897e
...
...
@@ -51,12 +51,7 @@ class Saml2Backend(Saml2BackendBase):
if
max_length
>
0
and
len
(
attr
)
>
max_length
:
logger
.
info
(
"Main attribute '
%
s' is too long."
%
attr
)
hashed
=
sha
.
new
(
attr
)
.
hexdigest
()
if
"@"
in
attr
:
domain
=
attr
.
rsplit
(
"@"
,
1
)[
1
]
attr
=
"
%
s@
%
s"
%
(
hashed
[:
max_length
-
1
-
len
(
domain
)],
domain
)
else
:
attr
=
hashed
[:
max_length
]
attr
=
hashed
[:
max_length
]
logger
.
info
(
"New main attribute:
%
s"
%
attr
)
return
attr
...
...
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