Skip to content

Commit

Permalink
Merge pull request #3 from skip-pay/FixMSOXSSVulnerability
Browse files Browse the repository at this point in the history
fix MSO XSS vulnerability
  • Loading branch information
Formulka authored May 16, 2023
2 parents c0a787d + 508a807 commit 8ce21b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion auth_token/contrib/common/default/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from urllib.parse import quote_plus

from django.contrib.auth.views import LoginView, LogoutView
from django.utils.decorators import method_decorator
from django.urls import reverse, NoReverseMatch
Expand Down Expand Up @@ -40,7 +42,7 @@ def _get_sso_login_methods(self):
return [
{
'name': 'microsoft',
'url': f'{reverse("ms-sso-login")}?next={self.request.GET.get("next", "/")}',
'url': f'{reverse("ms-sso-login")}?next={quote_plus(self.request.GET.get("next", "/"), safe="/")}',
'label': gettext('Continue with Microsoft account')
}
]
Expand Down

0 comments on commit 8ce21b5

Please sign in to comment.