Skip to content

mojo-http 0.0.5

Latest

Choose a tag to compare

@drobertson-dev drobertson-dev released this 29 Nov 00:13
· 449 commits to main since this release

Three security fixes, a Host field that is checked, and a build that prints no warnings from the library.

Security

  • Static files. Static held a file's name to its root and then opened the file by that name: someone able to write under the root could swap the entry for a symlink in between and be sent a file from outside it. Each opened file is now checked for where it really is, and nothing is sent from one outside the root. An empty root, which served every path on the machine, serves nothing. On Linux, serving static files now needs /proc.
  • PostgreSQL. With no sslmode the driver connected as libpq's prefer does, and would send the password in clear text to whoever answered. A database on another machine is now verified (verify-full): one that declines TLS, or shows a certificate this machine doesn't trust for its name, is refused before anything is sent. A database on this machine (a loopback address) connects as before. A database on another host without such a certificate now needs sslmode=disable, prefer or require in its URL.
  • Rate limits. RateLimit let a request through uncounted when its table had no free place near the client's, and with by_header a caller could arrange that. Such a client is now counted from where its least-used neighbour stands, and where a client is counted can't be worked out from outside. Several limiters on one application give a response one set of RateLimit-* fields.

Also

  • A Host that is not a host and perhaps a port is answered 400 (RFC 9112 3.2); HTTP/2 and HTTP/3 hold :authority and host to the same rule.
  • Static hears a file changed through another hard link.
  • A program built against the library gets no compiler warnings from it.
  • The HttpArena entries, as they are submitted.

The full list is in CHANGELOG.md.

Packages

  • pip install mojo-http-asgi (Linux x86-64, glibc 2.35 or later, a CPU with AVX2). The wheel is attached with its SHA-256; it is the file on PyPI, built and checked on a runner from this tag.
  • The library and its compiler as conda packages, in the channel https://prefix.dev/drobertson-dev/mojo-http.