Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Connectivity Check
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
Container 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
edugain
eduGAIN Connectivity Check
Commits
b2f7a796
Commit
b2f7a796
authored
5 years ago
by
Marco Malavolti
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a problem with IdP displayName with quotes
parent
412cba5d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api.py
+1
-0
1 addition, 0 deletions
api.py
eccs2.py
+5
-5
5 additions, 5 deletions
eccs2.py
utils.py
+2
-2
2 additions, 2 deletions
utils.py
with
8 additions
and
7 deletions
api.py
+
1
−
0
View file @
b2f7a796
...
...
@@ -61,6 +61,7 @@ class EccsResults(Resource):
for
line
in
lines
:
# Strip the line feed and carriage return characters
line
=
line
.
rstrip
(
"
\n\r
"
)
print
(
line
)
# Loads the json line into aux
aux
=
json
.
loads
(
line
)
...
...
This diff is collapsed.
Click to expand it.
eccs2.py
+
5
−
5
View file @
b2f7a796
...
...
@@ -97,7 +97,7 @@ def checkIdP(sp,idp,test):
return
(
idp
[
'
entityID
'
],
wayfless_url
,
check_time
,
"
(failed)
"
,
"
Timeout
"
)
except
Exception
as
e
:
print
(
"
!!! EXCEPTION !!!
"
)
print
(
"
!!! EXCEPTION
DRIVER
!!!
"
)
print
(
e
.
__str__
())
print
(
"
IdP: %s
\n
SP: %s
"
%
(
idp
[
'
entityID
'
],
sp
))
return
None
...
...
@@ -143,7 +143,7 @@ def checkIdP(sp,idp,test):
status_code
=
"
333
"
except
Exception
as
e
:
print
(
"
!!! EXCEPTION !!!
"
)
print
(
"
!!! EXCEPTION
REQUESTS
!!!
"
)
print
(
e
.
__str__
())
print
(
"
IdP: %s
\n
SP: %s
"
%
(
idp
[
'
entityID
'
],
sp
))
status_code
=
"
555
"
...
...
@@ -161,10 +161,10 @@ def getDisplayName(display_name):
display_name_equal_splitted
=
display_name
.
split
(
'
==
'
)
for
elem
in
display_name_equal_splitted
:
if
"
en
"
in
elem
:
if
"
'
"
in
elem
:
elem
=
elem
.
replace
(
"
'
"
,
"'"
)
if
"
'
"
in
elem
:
elem
=
elem
.
replace
(
"
'
"
,
"'"
)
elem
=
elem
.
replace
(
"
'
"
,
"'"
)
if
'"'
in
elem
:
elem
=
elem
.
replace
(
'"'
,
'
\\
"'
)
return
elem
.
split
(
'
;
'
)[
1
]
...
...
This diff is collapsed.
Click to expand it.
utils.py
+
2
−
2
View file @
b2f7a796
...
...
@@ -50,7 +50,7 @@ def getListFeds(url, dest_file):
# then open it and work with local file
with
open
(
"
%s
"
%
(
dest_file
),
mode
=
"
r
"
,
encoding
=
'
utf-8
'
)
as
f
:
return
json
.
loads
(
f
.
read
().
replace
(
"'"
,
"
&
apos
;
"
))
return
json
.
loads
(
f
.
read
().
replace
(
"'"
,
"
&
#039
;
"
))
# Download all eduGAIN IdPs from URL, store them on a local file and returns a Python List
...
...
@@ -63,7 +63,7 @@ def getListEccsIdps(url, dest_file):
# then open it and work with local file
with
open
(
"
%s
"
%
(
dest_file
),
mode
=
"
r
"
,
encoding
=
'
utf-8
'
)
as
f
:
return
json
.
loads
(
f
.
read
().
replace
(
"'"
,
"
&
apos
;
"
))
return
json
.
loads
(
f
.
read
().
replace
(
"'"
,
"
&
#039
;
"
))
# Use logger to produce files consumed by ECCS-2 API
...
...
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