Closed PapaTutuWawa closed 2 years ago
Oh, any idea what's the diff? Will fix it ASAP.
So, a small investigation of mine shows that the issue starts with FastAPI version 0.65.2. What might be interesting here are the breaking/security changes in 0.65.2 and 0.65.3:
Check Content-Type request header before assuming JSON [...]
(0.65.2)Assume request bodies contain JSON when no Content-Type header is provided. [...]
(0.65.3)As I have no experience with FastAPI, I don't know how far digging deeper will lead me, but I will probably try.
These both sound very likely! I guess our libraries may not always set the correct content type (maybe). Which clients are failing? All of them?
I tried this with the EteSync app from F-Droid and the python library
@PapaTutuWawa Do you still have this issue?
etebase-server
works fine for me on latest nixos-unstable
but I've also never had this issue before.
My config for reference (I'm using it behind nginx): https://gitlab.com/felschr/nixos-config/-/blob/main/services/etebase.nix
@felschr The problem is that nixos-unstable
does not have the master
branch of etebase-server packaged, which was needed for my patched version adding LDAP support. Just for clarification: I tested this both with and without my patches. Both times the same result.
Do we need to make a new relesae?
Since e0010f21f6e894380c07ecca2419cea24fae3718 I also get 422 errors, which cause the Android client to make error notifications. In that commit FastAPI is upgraded from 0.63.0 to 0.75.0. The issue does not appear on my Debian 10/buster with FastAPI versions 0.63.0, 0.65.0, 0.65.1, but with 0.65.2, 0.65.3 and 0.75.0. That is consistent with @PapaTutuWawa's finding.
Oh damn. @victor-rds, I think we should downgrade fastapi until we get to the bottom of this. Because we use msgpack this can be a pain to fix.
I'll also attempt to quick-fix it later today or sometime tomorrow.
Oh damn. @victor-rds, I think we should downgrade fastapi until we get to the bottom of this. Because we use msgpack this can be a pain to fix.
Yeah I tested only with the official web client, and haven't noticed any 4xx errors on my logs I will make a new PR.
Just wanted to say that this fixed my issue. Thanks!
Yay, thanks for letting us know!
This is not a feature request but a hint for anyone else who might be in the same situation as me:
I recently wanted to run the master branch of the EteSync server on my NixOS unstable host. However, whenever I wanted to log in or register, I got returned a 422 Unprocessable Entity. After some digging, I found out that NixOS unstable ships FastAPI version 0.70.0, while the EteSync server requires 0.63.0. This means that FastAPI has made a change somewhere between 0.63.0 and 0.70.0 that break the EteSync server, which meant that I have to downgrade the FastAPI version on NixOS.