Changelog

All versions and downloads Jump to Added | Changed | Fixed | Security

Unreleased [Not released yet]

Part 13 of 13. Previous part

Security (124)

  • live.js refuses, in a style attribute that the page sets (style={:s} as a string or an object, a quoted value with {:…}, and a spread), each declaration whose name is behavior, -moz-binding or -ms-behavior in any case, or has a \ or a /* in its name (a CSS escape or a comment). This is a precaution. It reads each ; as the end of a declaration, so it can refuse a part of a quoted value that looks like such a declaration. It keeps every other part as it is, also a data URL with a ; in a quote. The server's first paint refuses a value with ;, so it leaves such a data URL out. live.js is 107 bytes larger when minified and gzipped (12_381 to 12_488). Before, only the first paint of the server refused these names.
  • wisp deploy init docker, init tor and the host configs do not write through a symbolic link. A link named Dockerfile, .dockerignore, docker-compose.yml, tor.Dockerfile, torrc or a file of deploy/tor/ is an error. Before, a link to a missing file passed the check for an existing file, and the write created the target.
  • wisp deploy init tor creates the .env file with mode 0600 on Unix. --force sets the mode 0600 on an old file before the write. Before, the command set the mode after the write. The file holds no secret at that time.
  • An HTTP/2 request with :method, :path or :authority twice is malformed (RFC 9113 8.3), also when the first value is empty. Before, an empty first value let a second one pass.
  • On an edge build, the WebSocket of a host that gives whole messages (Workers, Deno.serve, Bun.serve) counts each queued message toward its flood bound. An empty message counts too. Past the bound, Wisp closes the socket. Before, a client that sent only empty messages grew the queue with no bound while the handler did not read.
  • On AWS Lambda, a WebSocket counts each unread message toward its 1 MiB bound (AHEAD), also an empty one. Past the bound, recv ends. Before, a client that sent only empty messages grew the queue with no bound while the handler did not read. The messages that a handler sends before $connect is answered count the same way. Past the bound, send fails.
  • Password::check and login treat a Plain password (the text typed, not hashed yet) as no hash. The result is false, and the check takes as long as for no member. Before, a Plain value whose text was a hash of the password typed checked as true. A Table::new table (in memory) keeps a Plain row, and that row never signs in.
  • A Password in a BTreeMap<String, Password> or HashMap<String, Password> field now seals as one in a Vec does. The same holds for a Password in a Row<T> field. A saved table (Table) refuses a typed one (a 500) and reads a stored one as the hash it is. A REST write (#[derive(Rest)]) counts a typed one in its limit of 16 passwords and hashes it. Before, none of this held. The table hashed the typed text inside the write, on the worker. A row read back kept its hash as text typed, so Password::check and login never matched it. A REST write hashed any number of them, past the limit.
  • Upstream::respond sends a content-type with an empty media type (; charset=utf-8 or ;text/html, for example) as application/octet-stream, like an empty value. Before, it sent such a value as it came, with no content-security-policy: sandbox. The check read the media type as empty and counted it as data.
  • The Markdown parser pulldown-cmark is now 0.13.6. Version 0.13.5 has RUSTSEC-2026-0433: quadratic parsing of nested image wikilinks with ENABLE_WIKILINKS. Wisp does not set that option (crates/wisp-build/src/markdown.rs, crates/wisp-build/src/seo.rs), but the weekly advisories check reports the old version.
  • A request body with Content-Encoding: gzip can hold one dynamic Huffman block for each 24 bytes of its deflate data (not the gzip header and trailer), and 64 more. A body with more answers 400. A dynamic block builds its codes and can make no output, so a body of many such blocks used time that WISP_BODY_LIMIT did not limit.
  • On a server with TLS (the tls feature and WISP_TLS_CERT) and no ORIGIN, the origin check rejects an http:// origin with 403. A request with no x-forwarded-proto header now gets the 403 too. The rule holds for form posts and WebSocket upgrades. Before, the fast path of the check passed an http:// origin that named the Host, and the post got its normal answer. So with the old code, a plain-HTTP page on the name of the site may post to the HTTPS site. Anyone on the network can write such a page. A request with an x-forwarded-proto header was not affected.
  • An error about a store setting (WISP_KV_<NAME>, WISP_BLOB_<NAME>, WISP_SQL_<NAME>, WISP_STORE) or an OTLP endpoint (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) shows only the scheme and the host of the value. Before, it showed the whole value, with a user, a password or a query such as ?authToken=, and the logs got it. When a /, ? or # in a password hides where the host starts, the error shows (hidden) for the host. A value with no :// shows only its driver word, such as fs or cf, else (hidden). The edge bridge (bridge.js) uses the same rules. On an edge build, a fetch error shows (hidden) for the host in the same case. An OTEL_EXPORTER_OTLP_HEADERS entry with no = does not show. An OTLP endpoint host with a ? or # stops the server at start. The start error names the reason, such as it has a user (@), but not the value. An @ after a raw / in an OTLP endpoint also counts as a user. The log line of a failed trace POST shows the endpoint path with no query. On an edge build, a WISP_STORE read or write that fails shows each URL in its reason as the host only.
  • Without ORIGIN, a form post or WebSocket upgrade with an Origin that has no host (https://) and an empty Host is a 403. Before, the empty host matched the empty Host, so the request passed.
  • On a native build, the origin check of a form post or WebSocket upgrade counts a Sec-Fetch-Site that is not UTF-8 as cross-site. Before, Wisp read it as no header, so a request with no Origin passed. With Origin: null and such a header, the valid token of a <form guard> does not let the post in.
  • A REST write with an if-match or if-none-match header that is not UTF-8 is a 412: changed for if-match, matched for if-none-match. A POST with an if-none-match that is not UTF-8 is a 412 too. Before, Wisp read such a header as absent, skipped the precondition and made the change. On the lazy path of a wasm edge build, the host gives each header as text (Headers.get), so Wisp reads that text.
  • The start errors of ORIGIN and WISP_ONION_LOCATION show *** in place of user info (user:pass@), a query and a fragment. The scheme, the host and the path stay. When a ? or # comes before the last @, the error shows only the scheme and ***. Before, the error showed the whole value, so the log got any password or token in it.
  • body: T answers 415 to a body whose content-type is not UTF-8. A file request with an if-range that is not UTF-8 gets the whole file (200), not the range. A range that is not UTF-8 keeps a COMPRESS answer as it is, as a range in text does. Before, Wisp read each such header as absent. So it read the body as JSON, sent the range with no check of the tag, and compressed the answer. On the lazy path of a wasm edge build, the host gives each header as text (Headers.get), so Wisp reads that text.
  • On the raw sockets of the node, bun and deno targets, the origin check counts a Sec-Fetch-Site that is not UTF-8 as cross-site. Before, it read such a header as absent, so a form post with no Origin passed.
  • Without ORIGIN, the origin check of a native build counts an X-Forwarded-Proto entry that is not UTF-8 as https. So a post from an http:// origin gets a 403. Before, Wisp read the entry as absent, and the post passed.
  • On a native build, a line of the WISP_CLIENT_IP_HEADER header that is not UTF-8 counts in WISP_CLIENT_IP_DEPTH. When the picked entry is not UTF-8, cx.client_ip() is the peer. Before, Wisp skipped such a line, so the depth could pick an address that the client sent.
  • The dev endpoints count a proxy header (forwarded, x-forwarded-for and the others of their list) by its name, also when its value is not UTF-8. Before, such a value in the first line of the header read as no header. So a request that a tunnel passed on may reach the dev endpoints.

Source: CHANGELOG.md