mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-12 01:45:56 -05:00
importing failure - possibly too big file #1444
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eleaner on GitHub (Dec 21, 2022).
Subject of the issue
The import of a bigger file fails but works perfectly on vault.bitwarden.com
Smaller files do work.
Is it possible that traefik (or something) has a default setting that limits sie of the request?
Deployment environment
Install method: docker-compose using this
https://github.com/dani-garcia/vaultwarden/wiki/Docker---Traefik---ModSecurity-Setup
Clients used: web-ui/cli
Reverse proxy and version: traefik:latest
MySQL/MariaDB or PostgreSQL version: n/a
Other relevant details:
Steps to reproduce
hard, possibly trying to import a bigger file
I tried bitwarden json ~600kb and dashlane CSV ~1500kb
import of smaller files works
Expected behaviour
the data is imported into database
Actual behaviour
the server reports
on web-ui

Troubleshooting data
@BlackDex commented on GitHub (Dec 21, 2022):
Check the limits of your reverse proxy. All of this is done client side, encrypted, and then send. Some reverse proxies just cut off the request and send it further, if that happens here, the incoming json is invalid. I have successfully imported files of several MB's large without issues.
Also, check the modsecurity settings, those sometimes break the communication between client and server.
@eleaner commented on GitHub (Dec 21, 2022):
oh my
I am simply following the recipe without really understanding what might break
I see what you say, but I am not even sure where to check the things you mentioned
@BlackDex commented on GitHub (Dec 21, 2022):
Maybe this can help?
https://doc.traefik.io/traefik/middlewares/http/buffering/#maxrequestbodybytes
I have never used it my self, so no clue actually.
@eleaner commented on GitHub (Dec 21, 2022):
Thank you for the hint, but unfortunately, that does not look like a solution
I kind of suspect modsecurity now, but I am not even sure how to approach it.
@eleaner commented on GitHub (Dec 21, 2022):
The default configuration of ModSecurity seems to be set to:
it should be plenty-enough
@BlackDex commented on GitHub (Dec 21, 2022):
If this values are bytes, then it's just 1MB for
the NoFilesLimit which is probably the cause of your issue here.
@BlackDex commented on GitHub (Dec 21, 2022):
Also, check the logs of traefik, or increase the log level.
@eleaner commented on GitHub (Dec 21, 2022):
@BlackDex looks like you were right
I found the error reported in the ModSecurioty logs
"Request body no files data length is larger than the configured limit (131072)."
adding EVN variable
MODSEC_REQ_BODY_NOFILES_LIMIT: 13107200solved this problem
but subsequent load triggered a mass of errors reported by /etc/modsecurity.d/owasp-crs/rules/
combined with fail2ban I am now locked from my vw :(
I wonder if I need all this paranoia; maybe simple vw+traefik would be enough
time for bed