zephyr/subsys/net/lib/http
Matt Rodgers 989fdadfe2 net: lib: http_server: prevent falsely matching HTTP headers
Using strncasecmp to match HTTP headers can give unexpected results when
the strings to be compared match up until the end of one string, but the
other string contains additional characters. This can result in falsely
matching a HTTP header value, for example:

strncasecmp("Upgrade-Something", "Upgrade", sizeof("Upgrade") - 1) --> 0

In this case we know that both strings are NULL terminated since one is
a string literal and we have just length-checked and explicitly NULL
terminated the other. So we can just use strcasecmp without a max
length.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-02 12:33:03 -04:00
..
headers net: lib: http_server: add static fs resource 2024-07-31 10:08:16 +02:00
CMakeLists.txt net: lib: http_server: add static fs resource 2024-07-31 10:08:16 +02:00
http_client.c net: lib: http: call socket poll for http_client send 2024-07-09 14:04:29 +02:00
http_hpack.c net: lib: http_server: Fix possible NULL pointer dereference 2024-06-24 12:41:22 -04:00
http_huffman.c
http_parser_url.c net: change controlling expressions in while to Boolean 2024-06-11 20:03:16 +03:00
http_parser.c net: change controlling expressions in while to Boolean 2024-06-11 20:03:16 +03:00
http_server_core.c net: lib: http_server: add static fs resource 2024-07-31 10:08:16 +02:00
http_server_http1.c net: lib: http_server: prevent falsely matching HTTP headers 2024-09-02 12:33:03 -04:00
http_server_http2.c net: lib: http_server: add static fs resource 2024-07-31 10:08:16 +02:00
http_server_ws.c net: http_server: Add websocket support 2024-05-08 15:02:16 -05:00
iterables.ld net: lib: http_server: add static fs resource 2024-07-31 10:08:16 +02:00
Kconfig net: lib: http: Use Kconfig constants 2024-07-30 18:31:11 +01:00
README_http_parser