mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-27 22:35:20 -04:00
Correct type hints for parse_string(s)_from_args. (#10137)
This commit is contained in:
parent
7dc14730d9
commit
9e4610cc27
8 changed files with 132 additions and 83 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
import logging
|
||||
import re
|
||||
from typing import TYPE_CHECKING, Awaitable, Callable, Dict, Optional
|
||||
from typing import TYPE_CHECKING, Awaitable, Callable, Dict, List, Optional
|
||||
|
||||
from synapse.api.errors import Codes, LoginError, SynapseError
|
||||
from synapse.api.ratelimiting import Ratelimiter
|
||||
|
@ -25,6 +25,7 @@ from synapse.http import get_request_uri
|
|||
from synapse.http.server import HttpServer, finish_request
|
||||
from synapse.http.servlet import (
|
||||
RestServlet,
|
||||
parse_bytes_from_args,
|
||||
parse_json_object_from_request,
|
||||
parse_string,
|
||||
)
|
||||
|
@ -437,9 +438,8 @@ class SsoRedirectServlet(RestServlet):
|
|||
finish_request(request)
|
||||
return
|
||||
|
||||
client_redirect_url = parse_string(
|
||||
request, "redirectUrl", required=True, encoding=None
|
||||
)
|
||||
args = request.args # type: Dict[bytes, List[bytes]] # type: ignore
|
||||
client_redirect_url = parse_bytes_from_args(args, "redirectUrl", required=True)
|
||||
sso_url = await self._sso_handler.handle_redirect_request(
|
||||
request,
|
||||
client_redirect_url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue