Skip to content

Commit ceca3a1

Browse files
patchback[bot]barttran2kDreamsorcerer
authored
[PR #12332/06e510b2 backport][3.14] Security: Silent Exception Swallowing in Server Request Handler Factory (#12370)
**This is a backport of PR #12332 as merged into master (06e510b).** Signed-off-by: Trần Bách <[email protected]> Co-authored-by: Trần Bách <[email protected]> Co-authored-by: Sam Bull <[email protected]>
1 parent 79f438d commit ceca3a1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

aiohttp/web_server.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,11 @@ def __call__(self) -> RequestHandler:
8181
for k, v in self._kwargs.items()
8282
if k in ["debug", "access_log_class"]
8383
}
84-
return RequestHandler(self, loop=self._loop, **kwargs)
84+
handler = RequestHandler(self, loop=self._loop, **kwargs)
85+
handler.logger.warning(
86+
"Failed to create request handler with custom kwargs %r, "
87+
"falling back to filtered kwargs. This may indicate a "
88+
"misconfiguration.",
89+
self._kwargs,
90+
)
91+
return handler

0 commit comments

Comments
 (0)