All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Aggressively test everything
- Add the missing unit tests for the server endpoints (code coverage is increased to 84%)
- Create a custom testing framework (written in Bash) for adding test fixtures
- Support auto-deletion of expired files
rustypaste
can now delete the expired files by itself. To enable this feature, add the following line to the [paste]
section in the configuration file:
# expired files will be cleaned up hourly
delete_expired_files = { enabled = true, interval = "1h" }
For users who want to have this feature disabled, there is an alternative shell script recommended in the documentation.
- Add systemd service files
- systemd files have been added to serve files from
/var/lib/rustypaste
, createrustypaste
user automatically viasystemd-sysusers
and configureAUTH_TOKEN
viarustypaste.env
. - For the installation and usage, see the Arch Linux PKGBUILD.
- systemd files have been added to serve files from
- Upgrade Actix dependencies
actix-web
is updated to4.0.*
- Strip the binaries during automated builds
- Size of the Docker image is reduced by ~20%
- Prevent invalid attempts of serving directories
- This fixes an issue where requesting a directory was possible via e.g.
curl --path-as-is 0.0.0.0:8080/.
- This issue had no security impact (path traversal wasn't possible) since internal server error was returned.
- This fixes an issue where requesting a directory was possible via e.g.
- Add instructions for installing rustypaste on Arch Linux
pacman -S rustypaste
🎉
- Fix a bug where the use of
CONFIG
environment variable causes a conflict between the configuration file path and[config]
section
- Support setting the refresh rate for hot-reloading the configuration file.
[config]
refresh_rate="1s"
- Support setting the timeout for HTTP requests.
[server]
timeout="30s"
- Bump regex crate to 1.5.5
- Fixes CVE-2022-24713
- Support setting the authentication token in the configuration file.
- This is an alternative (but not recommended) way of setting up authentication when the use of
AUTH_TOKEN
environment variable is not applicable.
- This is an alternative (but not recommended) way of setting up authentication when the use of
[server]
auth_token="hunter2"
- Improve the concurrency
- Shrink the scope of non-suspendable types (
#[must_not_suspend]
) for dropping them before reaching a suspend point (.await
call). This avoids possible deadlocks, delays, and situations whereFuture
s not implementingSend
. - Reference: https://rust-lang.github.io/rfcs/3014-must-not-suspend-lint.html
- Shrink the scope of non-suspendable types (
- Gracefully handle the hot-reloading errors.
-
Support pasting files from remote URLs (via
remote=
form field){server.max_content_length}
is used for download limit- See README.md#paste-file-from-remote-url
-
Hot reload configuration file to apply configuration changes instantly without restarting the server
- Library: Switch to Rust 2021 edition
- Prevent serving an already expired file
In the previous versions, it was possible to view an expired file by using the correct extension (timestamp). e.g. paste.com/expired_file.txt.1630094518049
will serve the file normally although paste.com/expired_file.txt
says that it is expired. This version fixes this vulnerability by regex-checking the requested file's extension.
reference: f078a9afa74f8608ee3f2a6e705159df15915c78
- Added an entry in the configuration file to disable "duplicate uploads":
[paste]
# default: true
duplicate_files = false
Under the hood, it checks the SHA256 digest of the uploaded files.
- Update README.md:
- Mention the new standalone tool: rustypaste-cli
- Add installation section.
- Support expiring links (via
expire:
header)- Timestamps are used as extension for expiring files
- Expired files can be cleaned up with this command
- Support one shot links (via
oneshot=
form field){server.upload_path}/oneshot
is used for storage
- Switch to upload-release-action for uploading releases
- Support overriding MIME types (config:
mime_override
) - Support blacklisting MIME types (config:
mime_blacklist
)
- Support shortening URLs (via
url=
form field){server.upload_path}/url
is used for storage
- Prevent sending empty file name and zero bytes
- Prevent path traversal on upload directory (#2)
- Check the content length while reading bytes for preventing OOM (#1)
- Update Continuous Deployment workflow to publish Docker images
Initial release.