Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74928 - Uploading attachments fails

Attached to Project: Community Packages
Opened by Mathijs van Veluw (BlackDex) - Wednesday, 01 June 2022, 11:53 GMT
Last edited by Morten Linderud (Foxboron) - Thursday, 02 June 2022, 20:25 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using Vaultwarden or Bitwarden it self for that matter this specific archlinux build is broken when it comes to uploading attachments.
For some strange reason it breaks the `multipart/form-data`. If i use the binary pre-build from the Bitwarden release page on github it works fine.

Additional info:
* 1.22.1 (1.22.1-2)

Steps to reproduce:
1. Login to a bitwarden or vaultwarden server using the CLI.
2. Try to upload an attachment to a cipher/item like this `bw create attachment --file /path/to/file.png --itemid some-uuid-of-cipher`
3. See the error message.

If you try the same with the binary from github, there is no issue.

If i check the HTTP headers sent, i see the following:
Arch-Linux pre-build binary:
```
Content-Type: multipart/form-data;boundary=--------------------------097815959179582168041088
Bitwarden-Client-Name: cli
Bitwarden-Client-Version: 1.22.1
Accept: */*
Accept-Encoding: gzip,deflate

----------------------------097815959179582168041088
Content-Disposition: form-data; name="data"; filename="ezs0PgE9QxMs0pu1huQ5jSNLoiuyUVb+jPGuNq+0="
Content-Type: application/octet-stream

----------------------------097815959179582168041088
Content-Disposition: form-data; name="data"; filename="2.k/CTD+VT1ISkJntV2KKVHQ==|Tv3h2/AJFHGrg8IwyFlbivj6gW1PzLzOzv/ojEbv20zS6zaayTSYONyK6T8Lxv6p1nQcNcRE06oDTFjJntaYAg==|6B/ezs0PgE9QxMs0pu1huQ5jSNLoiuyUVb+jPGuNq+0="
Content-Type: application/octet-stream
```

With the Bitwarden Github binary:
```
Content-Type: multipart/form-data;boundary=--------------------------760331512150555356594257
Bitwarden-Client-Name: cli
Bitwarden-Client-Version: 1.22.1
Accept: */*
Accept-Encoding: gzip,deflate

----------------------------760331512150555356594257
Content-Disposition: form-data; name="data"; filename="2.qNTA6oxfxk4cngKkjMD7aQ==|MW4cgGlFwpqxWC3O6Bhn+st/r397GOEbK7cRNKa7R0x+qQXmieaH5o5f0Q+B0b4v7u0R31NNYcya8vtYOFBohw==|j6Fv84GtCLqMxI6Rg3kyTMfVIJmBfLKPkFEGLjdUEq4="
Content-Type: application/octet-stream
```
This task depends upon

Closed by  Morten Linderud (Foxboron)
Thursday, 02 June 2022, 20:25 GMT
Reason for closing:  None

Loading...