Skip to content

Commit 8ce21b5

Browse files
authored
Merge pull request #3 from skip-pay/FixMSOXSSVulnerability
fix MSO XSS vulnerability
2 parents c0a787d + 508a807 commit 8ce21b5

File tree

1 file changed

+3
-1
lines changed
  • auth_token/contrib/common/default

1 file changed

+3
-1
lines changed

auth_token/contrib/common/default/views.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from urllib.parse import quote_plus
2+
13
from django.contrib.auth.views import LoginView, LogoutView
24
from django.utils.decorators import method_decorator
35
from django.urls import reverse, NoReverseMatch
@@ -40,7 +42,7 @@ def _get_sso_login_methods(self):
4042
return [
4143
{
4244
'name': 'microsoft',
43-
'url': f'{reverse("ms-sso-login")}?next={self.request.GET.get("next", "/")}',
45+
'url': f'{reverse("ms-sso-login")}?next={quote_plus(self.request.GET.get("next", "/"), safe="/")}',
4446
'label': gettext('Continue with Microsoft account')
4547
}
4648
]

0 commit comments

Comments
 (0)