0002-misc-add-registration-redirect-URL-to-whitelist-4730.patch
src/authentic2/utils/__init__.py | ||
---|---|---|
921 | 921 |
for origin in app_settings.A2_REDIRECT_WHITELIST: |
922 | 922 |
if same_origin(next_url, origin): |
923 | 923 |
return True |
924 |
if app_settings.A2_REGISTRATION_REDIRECT: |
|
925 |
origin = app_settings.A2_REGISTRATION_REDIRECT |
|
926 |
if isinstance(origin, (tuple, list)): |
|
927 |
origin = origin[0] |
|
928 |
if same_origin(next_url, origin): |
|
929 |
return True |
|
924 | 930 |
result = hooks.call_hooks_first_result('good_next_url', next_url) |
925 | 931 |
if result is not None: |
926 | 932 |
return result |
src/authentic2_auth_fc/views.py | ||
---|---|---|
571 | 571 |
hooks.call_hooks('event', name='fc-unlink', user=self.request.user) |
572 | 572 |
messages.info(self.request, _('The link with the FranceConnect account has been deleted.')) |
573 | 573 |
links.delete() |
574 |
return super(UnlinkView, self).form_valid(form) |
|
574 |
response = super(UnlinkView, self).form_valid(form) |
|
575 |
if app_settings.logout_when_unlink: |
|
576 |
response.display_message = False |
|
577 |
return response |
|
575 | 578 | |
576 | 579 |
def get_context_data(self, **kwargs): |
577 | 580 |
context = super(UnlinkView, self).get_context_data(**kwargs) |
578 |
- |