Forbidden (403) CSRF verification failed. Request aborted. while logging in in Label Studio

Once labelstudio is updated to version

and run from commandline:

LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1 HOST='https://...' nohup label-studio -b --data-dir /label-studio/data/ -db /label-studio/db.sqlite --log-level INFO --internal-host localhost -p 8080 --host https://... --agree-fix-sqlite > label-studio.out 2> label-studio.err &

On login attempt it results in an issue:

Forbidden (403) CSRF verification failed. Request aborted.

The setup is Python 3.11.11 with the following relevant modules:

label-studio==1.15.0
label-studio-converter==0.0.59
label-studio-sdk==1.0.8
label-studio-tools==0.0.4

The issue has been reported on GitHub and one of the users provided a workaround of using a system variable:

 USE_ENFORCE_CSRF_CHECKS=false

but it must be understood that:

Disabling CSRF as shown above will fix this, but note that it also makes Label Studio less secure.

Either way, it is a temporary solution until a fix is available.

Вернуться на верх