Repository navigation
Anole 0.1.3
A security release. I found these while reviewing the API before 0.2.0. Please upgrade:
zig fetch --save git+https://github.com/xuckless/anole#v0.1.3Security
res.sendFilecould read files outside its directory. (GHSA-wmj5-wvf6-w55f) A..segment or an absolute path in request input (a route or query parameter) opened any file the server could read. It now answers 404, as static routes already did. Static routes were not affected.- WebSocket
Roomscould broadcast to a freed socket. (GHSA-8vq8-rhf6-gfw8) A socket that ended without callingleavestayed in its rooms. A socket now leaves every room when it is released, and a member closed for not keeping up has its connection ended (on Windows too). - C ABI: a handle from a destroyed server could act on the next one in the same process. (GHSA-5xpj-5v44-fx4p) Such handles are now always
ANOLE_E_GONE. - Databases: a call that left a transaction open was treated as done. (GHSA-wf2w-hv3j-7jfm) On SQLite every later write joined that transaction; on PostgreSQL each statement committed on its own. Such a call is now rolled back and fails; a whole transaction in one call still works.
- C ABI: drain or reload from another thread during shutdown could use freed memory. (GHSA-whjh-35m7-w456) These calls now wait for a live server or answer as documented.
Each advisory has the details, who is affected and a workaround.
Breaking (C ABI users only)
- C ABI 0.6:
ANOLE_WT_FINis now 2. It was 1, the same bit asANOLE_BODY_BORROW, so a borrowed WebTransport write ended the stream. Rebuild against the newanole.h.
Fixed
- A conflicting route in the C ABI configuration is now
ANOLE_E_CONFIGfromanole_server_startinstead of a crash of the host process.
Full list in CHANGELOG.md.