Jetforce

Latest version: v0.10.1

Safety actively analyzes 625566 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.8.0

Changes

- Added support for international domain names using IDN encoding.
- Several improvements to internal python type hinting coverage.
- Added a ``py.typed`` file to indicate project support for type hints.
- Optimized TCP packets when streaming directory listings.
- Optimized TCP packets when streaming large CGI responses.
- Improved error handling to catch invalid responses from CGI scripts.
- Fixed a bug where TLS_CLIENT_AUTHORISED would sometimes be set to
``True``/``False`` instead of ``1``/``0``.
- Fixed error handling edge case when the client killed the connection
before all data has been sent. A `CancelledError` exception will now
be raised internally instead of a ``ConnectionClosed`` exception.

0.7.0

Spec Changes

- Requests containing URLs without a scheme are no longer accepted.
- The server will stop redirecting the root URL "gemini://example.com" to
"gemini://example.com/". These URLs are canonically the same per the url RFC
definition and should both return successful responses.
- The CGI variable TLS_CLIENT_HASH now formats the certificate hash as
"SHA256:\<HASH\>" where \<HASH\> is uppercase hexidecimal. The old base64
fingerprint will still be available as TLS_CLIENT_HASH_B64 to help migrate
existing CGI scripts, but it's recommended that you support the new hash
format moving forward.

0.6.0

Bugfixes

- The default mimetype for unknown file extensions will now be sent as
"application/octet-stream" instead of "text/plain". The expectation is that
it would be safer for a client to download an unknown file rather than
attempting to display it inline as text.
- Fixed a bug that prevented loading the default mimetype definitions from
/etc/mime.types and other system-level files.

Features

- The static file server now has a ``--rate-limit`` flag that can be used
to define per-IP address rate limiting for requests. Requests that exceed
the specified rate will receive a 44 SLOW DOWN error response.
- Server access logs are now directed to ``stdout`` instead of ``stderr``.
Error traceback and other messages will still be directed to ``stderr``.
- File chunking size has been optimized for streaming large static files.

Examples

- Added an example that demonstrates how to use the new ``RateLimiter`` class
(examples/rate_limit.py).

0.5.0

Spec Changes

- URLs with a userinfo component will now be rejected with a status of 59.
- The status code definitions have been updated to match the recent changes
to the gemini spec:
- 21 ``SUCCESS_END_OF_SESSION`` -> (removed)
- 61 ``TRANSIENT_CERTIFICATE_REQUESTED`` -> ``CERTIFICATE_NOT_AUTHORISED``
- 62 ``AUTHORISED_CERTIFICATE_REQUIRED`` -> ``CERTIFICATE_NOT_VALID``
- 63 ``CERTIFICATE_NOT_ACCEPTED`` -> (removed)
- 64 ``FUTURE_CERTIFICATE_REJECTED`` -> (removed)
- 65 ``EXPIRED_CERTIFICATE_REJECTED`` -> (removed)

Bugfixes

- Jetforce will now always terminate the TCP connection without waiting for a
TLS close_notify alert response from the client. This fixes a bug where some
clients would appear to hang after receiving the content from the server.

Features

- The jetforce-client tool now supports writing TLS keys to a logfile to
facilitate debugging TLS connections using tools like Wireshark.
- If an application response handler returns a twisted.Deferred object, the
errback will now be invoked when the TCP connection is closed.
- Error stack traces are no longer shown when the client prematurely closes
the connection.

Examples

- Added a new example that demonstrates streaming data to client connections
(examples/chatroom.py).
- Added a new example that demonstrates extending the static file server with
common patterns like redirects and authenticated directories
(examples/redirect.py).

0.4.0

Features

- Added a ``--default-lang`` command line argument to the static file server.
This setting will define a language parameter that will be attached to the
meta for all text/gemini responses. For example, ``--default-lang=en`` will
set the response meta to ``"text/gemini; lang=en"``.
- Added support for the "11 SENSITIVE INPUT" status code.
- The response header now uses a <space> instead of a <tab> to separate the
status code from the meta text.

0.3.2

Bugfixes

- The static file server will now URL-encode spaces (%20) and other reserved
characters in filenames.
- The ``Request`` class will now apply URL decoding to the following components
of the request, in addition to the query params:
- ``request.path``
- ``request.params``
- ``request.fragment``

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.