Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF Bug Not Resolved in Latest Release #6619

Open
TheAIWizard opened this issue Nov 8, 2024 · 7 comments
Open

CSRF Bug Not Resolved in Latest Release #6619

TheAIWizard opened this issue Nov 8, 2024 · 7 comments

Comments

@TheAIWizard
Copy link

TheAIWizard commented Nov 8, 2024

363895334-3351cb23-7767-47b9-b600-c7bece2fcf3d

Hi,

I'm still encountering the 403 Forbidden error related to CSRF, mentioned here in #6296, even after updating to version 1.14.0, which was supposed to address the CSRF errors when using Docker (#6344).

Could you please assist with resolving this?

Thanks in advance!

@makseq
Copy link
Member

makseq commented Nov 8, 2024

Could you show what you see on /version page?

@dbandurin
Copy link

Hello, I am running the Label studio container on Azure cloud. Today, when I tried to login into the studio, I got same message. What does it mean? It has been working fine for far, and I have not seen it before. I tried to re-register myself, but it does not help.
I am running the LS out of your container "heartexlabs/label-studio:latest". I wonder if it is caused by a recent image submission to that container registry

Here is my version page
Screenshot 2024-11-08 at 3 51 22 PM

@dbandurin
Copy link

FYI: the migration to version 1.13.1 helped. It works now.

@TheAIWizard
Copy link
Author

@makseq I got this:

{
  "release": "1.14.0",
  "label-studio-os-package": {
    "version": "1.14.0",
    "short_version": "1.14",
    "latest_version_from_pypi": "1.14.0",
    "latest_version_upload_time": "2024-11-04T17:28:49",
    "current_version_is_outdated": false
  },

  "label-studio-os-backend": {
    "message": "empty commit to trigger build with updated flags",
    "commit": "4223d73ba3dc1711ecbf30c4bf5df5acbf099c28",
    "date": "2024/10/24 16:53:57",
    "branch": "",
    "version": "1.14.0+0.g4223d73"
  },

  "label-studio-frontend": {
    "message": "feat: LEAP-1476: Add ability to edit classifications on existing comme ...",
    "commit": "e824fbd3bf170509ffa5dd815deb7b0a5705381b",
    "date": "2024-10-16T21:39:46.000Z",
    "branch": "develop"
  },

  "dm2": {
    "message": "fix: LEAP-1596: Missed check for review_settings (#6535)",
    "commit": "ff2f11da387840c0863c711494b7d7ed2e3fd5c2",
    "date": "2024-10-17T12:31:43.000Z",
    "branch": "develop"
  },

@nithin-bose
Copy link

nithin-bose commented Nov 12, 2024

I got this same issue. Was using the latest image. Interestingly, I did not pull or redeploy in the last 20 or so days, does the latest image auto update or something?

Reverting to 1.13.1 solved the issue for the time being

@jombooth
Copy link
Contributor

jombooth commented Nov 12, 2024

@TheAIWizard and others - can you describe a bit more about your setups? In particular, are you accessing your Docker server on the default URL of http://localhost:8080? Also, did you check out the repo at the 1.14.0 tag and docker-compose up build from there, or did you run the container some other way?

When I build label-studio in docker-compose at the 1.14.0 tag and access it at localhost:8080, it does seem to work, which is why I am asking these questions :)

If you use some origin other than http://localhost:8080 to access your LS server, I suspect adding that URL to CSRF_TRUSTED_ORIGINS in your docker compose override file or similar might help; see https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins

@nithin-bose
Copy link

nithin-bose commented Nov 13, 2024

I was using the docker image heartexlabs/label-studio:latest. It was deployed about a month prior on kubernetes. I am sure I was running 1.13 something when i had deployed it.

At the time I faced this issue, the kubernetes pods were up for more than 20 days, I didn't pull the latest image or restart the the pods. I never realised label studio switched to version 1.14 until I faced the issue and tried /version, which is weird, it shouldn't have updated at all.

The label studio instance is behind a traefik proxy. Maybe the origin should be set to * by default and be overridden by the value of CSRF_TRUSTED_ORIGINS if set, this issue blindsided me since I wasn't expecting it to update in the first place and since the previous version worked fine without the environment variable being set.

I have now pinned the docker image to 1.13.1. I should not have used latest in the first place. I'll try to update to 1.14 in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants