We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aef6348 commit b39f15eCopy full SHA for b39f15e
jupyter_server/auth/identity.py
@@ -17,6 +17,7 @@
17
import uuid
18
from dataclasses import asdict, dataclass
19
from http.cookies import Morsel
20
+from urllib.parse import unquote
21
22
from tornado import escape, httputil, web
23
from tornado.websocket import WebSocketHandler
@@ -435,6 +436,12 @@ def get_token(self, handler: web.RequestHandler) -> str | None:
435
436
for subprotocol in subprotocols:
437
if subprotocol.startswith(_TOKEN_SUBPROTOCOL + "."):
438
user_token = subprotocol[len(_TOKEN_SUBPROTOCOL) + 1 :]
439
+ try:
440
+ user_token = unquote(user_token)
441
+ except ValueError:
442
+ # leave tokens that fail to decode
443
+ # these won't be accepted, but proceed with validation
444
+ pass
445
break
446
447
return user_token
0 commit comments