mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2026-03-07 21:37:57 -05:00
* 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.
27 lines
558 B
YAML
27 lines
558 B
YAML
name: format
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
format:
|
|
name: format
|
|
strategy:
|
|
matrix:
|
|
ocaml-compiler:
|
|
- '5.3'
|
|
runs-on: 'ubuntu-latest'
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: Use OCaml ${{ matrix.ocaml-compiler }}
|
|
uses: ocaml/setup-ocaml@v3
|
|
with:
|
|
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
dune-cache: true
|
|
allow-prerelease-opam: true
|
|
|
|
- run: opam install ocamlformat.0.27.0
|
|
- run: opam exec -- make format-check
|
|
|