Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion okta_oauth2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from django.shortcuts import redirect, render
from django.urls import reverse
from django.urls.exceptions import NoReverseMatch
from django.utils.html import escape

from .conf import Config

Expand Down Expand Up @@ -60,7 +61,7 @@ def callback(request):
# Verify state
if state != cookie_state:
return HttpResponseBadRequest(
"Value {} does not match the assigned state".format(state)
"Value {} does not match the assigned state".format(escape(state))
)

user = authenticate(request, auth_code=code, nonce=cookie_nonce)
Expand Down