Skip to content

Commit df53d19

Browse files
committed
#32 Fix check_settings bug
1 parent 105638a commit df53d19

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/onelogin/saml2/settings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ def check_settings(self, settings):
338338
if 'sp' not in settings or len(settings['sp']) == 0:
339339
errors.append('sp_not_found')
340340
else:
341+
# check_sp_certs uses self.__sp so I add it
342+
old_sp = self.__sp
343+
self.__sp = settings['sp']
344+
341345
sp = settings['sp']
342346
security = {}
343347
if 'security' in settings:
@@ -415,6 +419,9 @@ def check_settings(self, settings):
415419
('url' not in organization or len(organization['url']) == 0):
416420
errors.append('organization_not_enought_data')
417421
break
422+
# Restores the value that had the self.__sp
423+
if 'old_sp' in locals():
424+
self.__sp = old_sp
418425

419426
return errors
420427

0 commit comments

Comments
 (0)