Commit graph

10 commits

Author SHA1 Message Date
Simon Cruanes
ba19880d75
hardening bugfixes
Some checks failed
github pages / deploy (push) Has been cancelled
build / build (4.13.x, ubuntu-latest) (push) Has been cancelled
build / build (4.14.x, ubuntu-latest) (push) Has been cancelled
build / build (5.03.x, ubuntu-latest) (push) Has been cancelled
* fix: use realpath to validate filesystem paths against traversal

- add string_prefix helper to check path containment
- compute root_canonical once per add_vfs_ call
- use realpath only for filesystem (on_fs=true), keeping simple
  contains_dot_dot check for VFS
- paths are already URL-decoded by Route.rest_of_path_urlencoded

* fix: add header size limits to prevent memory exhaustion

add optional limits to Headers.parse_:
- max_headers: 100 (default)
- max_header_size: 16KiB per header (default)
- max_total_size: 256KiB total (default)

returns 431 status code when limits exceeded per RFC 6585.
2026-02-10 19:57:21 -05:00
Simon Cruanes
e177153f10
remove dead comment 2025-03-14 11:12:11 -04:00
Simon Cruanes
0d750cd86c
fix prometheus 2024-02-26 14:05:56 -05:00
Simon Cruanes
13bfbfa759
docs 2024-02-20 12:55:55 -05:00
Simon Cruanes
c8852b15ab
function to update GC metrics when prometheus knocks 2024-01-19 15:46:44 -05:00
Simon Cruanes
7684f67bc1
add GC metrics to prometheus 2024-01-18 23:27:15 -05:00
Simon Cruanes
c19b8dc16f
add histograms to prometheus 2024-01-18 22:05:23 -05:00
Simon Cruanes
66ddee3522
more http handling 2024-01-18 21:34:47 -05:00
Simon Cruanes
9f9017f26a
add prometheus middleware for httpd 2024-01-18 21:25:49 -05:00
Simon Cruanes
53280ed562
basic prometheus library 2024-01-18 21:11:46 -05:00