Skip to content

Commit 3a6fe8c

Browse files
committed
v1.0.3
1 parent 32ca4b6 commit 3a6fe8c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changes
22
=======
33

4+
v1.0.3 (2020-02-04)
5+
- Django Logout behaviour improved
6+
7+
48
v1.0.2 (2020-01-24)
59
- RequestVersionTooLow exception handled in ACS
610
- Better exception handling for Malformed SAML Response

djangosaml2/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def get(self, request, *args, **kwargs):
469469
logger.exception('Error Handled - SLO not supported by IDP: {}'.format(exp))
470470
auth.logout(request)
471471
state.sync()
472-
return HttpResponseRedirect(settings.LOGOUT_REDIRECT_URL)
472+
return HttpResponseRedirect(getattr(settings, 'LOGOUT_REDIRECT_URL', '/'))
473473

474474
auth.logout(request)
475475
state.sync()
@@ -570,8 +570,8 @@ def do_logout_service(self, request, data, binding):
570570

571571
def finish_logout(request, response, next_page=None):
572572
if (getattr(settings, 'SAML_IGNORE_LOGOUT_ERRORS', False) or (response and response.status_ok())):
573-
if next_page is None and hasattr(settings, 'LOGOUT_REDIRECT_URL'):
574-
next_page = settings.LOGOUT_REDIRECT_URL
573+
if not next_page:
574+
next_page = getattr(settings, 'LOGOUT_REDIRECT_URL', '/')
575575
logger.debug('Performing django logout with a next_page of %s', next_page)
576576
return AuthLogoutView.as_view()(request, next_page=next_page)
577577
logger.error('Unknown error during the logout')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read(*rnames):
2424

2525
setup(
2626
name='djangosaml2',
27-
version='1.0.2',
27+
version='1.0.3',
2828
description='pysaml2 integration for Django',
2929
long_description=read('README.rst'),
3030
classifiers=[

0 commit comments

Comments
 (0)