mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 17:23:04 +03:00
importing failure - possibly too big file #972
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.
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:
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:
The default configuration of ModSecurity seems to be set to:
it should be plenty-enough
@eleaner commented on GitHub:
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:
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:
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.
@BlackDex commented on GitHub:
If this values are bytes, then it's just 1MB for
the NoFilesLimit which is probably the cause of your issue here.
@eleaner commented on GitHub:
@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
@BlackDex commented on GitHub:
Also, check the logs of traefik, or increase the log level.