Skip to content

Releases: orhun/rustypaste

v0.15.1

29 Jul 20:08
22162c0
Compare
Choose a tag to compare

Added

  • Include file creation date in the file list (creation_date_utc)
$ curl "http://<server_address>/list" | jq .

[
  {
    "file_name": "immense-goose.txt",
    "file_size": 416,
    "creation_date_utc": "2024-06-12 19:21:56",
    "expires_at_utc": null
  }
]
  • Enable Docker ARM64 builds
  • Add @tessus as a maintainer

Removed

  • Remove public instance link and blog post from README.md

Fixed

  • Fix uploading reports to codecov

New Contributors

Full Changelog: v0.15.0...v0.15.1

v0.15.0

27 Mar 20:09
44c07a3
Compare
Choose a tag to compare

Added

  • Allow to override filename when using random_url by @tessus in #233

Now you can use the filename header to override the name of the uploaded file.

For example:

curl -F "[email protected]" -H "filename:override.txt" http://localhost:8000

Even if random_url is set, the filename will be override.txt

rustypaste-cli also has a new argument for overriding the file name:

rpaste -n filename-on-server.txt awesome.txt
  • Use more specific HTTP status codes by @tessus in #262

rustypaste now returns more appropriate status codes in the following 2 cases (instead of a generic 500 code):

  • If the mime type is on the blacklist: UnsupportedMediaType (415)
  • If the file already exists: Conflict (409)

Changed

  • Do path joins more safely by @RealOrangeOne in #247
  • Gracefully exit when there is no config file found by @orhun
  • Switch to cargo-llvm-cov for code coverage by @orhun in #260
  • Replace unmaintained action by @tessus in #266
  • Set up mergify by @orhun
  • Apply clippy suggestions by @orhun
  • Update funding options by @orhun
  • Update the copyright years by @orhun
  • Bump dependencies

Fixed

  • Improve logging for deleted file by @tessus in #235
  • Fix deployment by @tessus in #236
  • Return the correct file on multiple files with same name by @tessus in #234
  • Update the hash of the example file by @tessus in #254
  • Error on upload with the same filename by @tessus in #258

New Contributors

v0.14.4

20 Dec 19:53
c8dd415
Compare
Choose a tag to compare

Removed

  • Remove excessive warning messages when auth tokens are not found (#210) (Thanks @tessus!)

v0.14.3

12 Dec 18:32
d6e1968
Compare
Choose a tag to compare

Changed

  • Return 404 for not exposed endpoints instead of 403
  • Disallow blank delete_tokens and auth_tokens
  • Bump dependencies

Thanks to @DDtKey for contributing to this release and creating protect-endpoints. 💖

v0.14.2

05 Dec 12:28
d4b02ec
Compare
Choose a tag to compare

Added

  • Add installation instructions for FreeBSD (#177)
  • Add auth token handling to HTML form example (#183)
  • Add release instructions

Changed

  • Bump Shuttle to 0.34.1
  • Bump dependencies

v0.14.1

02 Nov 23:09
79662d6
Compare
Choose a tag to compare

Changed

  • Switch to tracing for logging (#163)
  • Bump Shuttle to 0.31.0
  • Bump dependencies

v0.14.0

05 Sep 17:47
f46d2f5
Compare
Choose a tag to compare

Added

  • Add delete endpoint (#136)

Now you can delete files from the server with sending a DELETE request. To enable this, set the delete_tokens array in the configuration file or use the DELETE_TOKEN environment variable.

[server]
delete_tokens = [ "may_the_force_be_with_you" ]

And then you can send a DELETE request as follows:

$ curl -H "Authorization: may_the_force_be_with_you" -X DELETE "<server_address>/file.txt"

file deleted

You can also use rpaste (the command line tool) to delete files:

$ rpaste -d awesome.UA86.txt

Changed

  • Update crates and rustls deps (#135)
  • Bump Shuttle to 0.25.0

v0.13.0

26 Aug 20:43
a44ae94
Compare
Choose a tag to compare

Added

  • Support handling spaces in filenames (#107)

Now you can replace the whitespaces with either underscore or encoded space (%20) character in the filenames.

For example:

[server]
handle_spaces = "replace"
$ curl -F "file=@test file.txt" <server_address>

<server_address>/test_file.txt

Or you can use encoded spaces:

[server]
handle_spaces = "encode"
$ curl -F "file=@test file.txt" <server_address>

<server_address>/test%20file.txt

Please note that random_url should not be configured to use the original file names.

Changed

  • Improve random_url config handling (#122)

[paste].random_url.enabled is deprecated. You can now disable random URLs by commenting out [paste].random_url.

# enabled
random_url = { type = "petname", words = 2, separator = "-" }

# disabled
# random_url = { type = "petname", words = 2, separator = "-" }
  • Replace unmaintained actions (#116)
  • Bump Shuttle to 0.24.0
  • Bump dependencies

Fixed

  • Don't log invalid token in release builds (#112)

Before, invalid tokens were logged as follows:

[2023-08-13T19:24:30Z WARN  rustypaste::auth] authorization failure for a.b.c.d (header: invalid_token)

Now, we print the token only in debug mode. In release mode, the log entry will look like this:

[2023-08-13T19:24:30Z WARN  rustypaste::auth] authorization failure for a.b.c.d

v0.12.1

11 Aug 12:27
77f0e42
Compare
Choose a tag to compare

Fixed

  • Do not list expired files (#109)

v0.12.0

07 Aug 11:54
61d4a9e
Compare
Choose a tag to compare

Added

  • Add an endpoint for retrieving a list of files (#94)

Set the expose_list option to true in the configuration file for enabling this feature. It is disabled as default.

[server]
expose_list = true

Then you can receive the list of files as JSON via /list endpoint:

$ curl "http://<server_address>/list" | jq .

[
  {
    "file_name": "accepted-cicada.txt",
    "file_size": 241,
    "expires_at_utc": null
  },
  {
    "file_name": "evolving-ferret.txt",
    "file_size": 111,
    "expires_at_utc": "2023-08-07 10:51:14"
  }
]
  • Support multiple auth tokens (#84)

auth_token option is now deprecated and replaced with auth_tokens which supports an array of authentication tokens. For example:

[server]
auth_tokens = [
  "super_secret_token1",
  "super_secret_token2",
]
  • Add new line character to most prominent messages (#97)

This is a follow-up to #72 for making the terminal output better:

$ curl http://localhost:8000/sweeping-tahr
unauthorized

Changed

  • Bump Shuttle to 0.23.0
  • Bump dependencies

Fixed

  • Deploy the Shuttle service when a new tag is created