Skip to content

Commit 243909c

Browse files
barttran2kDreamsorcerer
authored andcommitted
Security: Silent Exception Swallowing in Server Request Handler Factory (#12332)
Signed-off-by: Trần Bách <45133811+barttran2k@users.noreply.github.com> Co-authored-by: Sam Bull <git@sambull.org> (cherry picked from commit 06e510b)
1 parent 3c04f9f commit 243909c

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)