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 verification failed. Request aborted. #5936

Closed
rezarazani opened this issue Apr 28, 2021 · 10 comments
Closed

CSRF verification failed. Request aborted. #5936

rezarazani opened this issue Apr 28, 2021 · 10 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@rezarazani
Copy link

rezarazani commented Apr 28, 2021

Hi, I ran docker-compose with this configuration

version: '3'
services:
  weblate:
    ports:
      - 127.0.0.1:6372:8080
    environment:
      WEBLATE_SITE_DOMAIN: *******
      WEBLATE_ADMIN_NAME : reza
      WEBLATE_ADMIN_PASSWORD: *********
      WEBLATE_ADMIN_EMAIL: **********@gmail.com

But when I try to login or register, I get this error

Screenshot from 2021-04-28 15-28-24

Is there a problem with the configuration or is the problem somewhere else?

@rezarazani rezarazani added the question This is more a question for the support than an issue. label Apr 28, 2021
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@nijel
Copy link
Member

nijel commented Apr 29, 2021

See https://docs.djangoproject.com/en/3.2/ref/csrf/#how-it-works for documentation on CSRF protection.

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label May 10, 2021
@gardenappl
Copy link

I'm getting the same error with Hosted Weblate when logging in via Firefox.

image

Tested in "safe mode" with all extensions disabled.

@nijel
Copy link
Member

nijel commented May 13, 2021

@gardenappl That is different error, you most likely have disabled sending referrer in Firefox, check https://wiki.mozilla.org/Security/Referrer

@github-actions github-actions bot removed the wontfix Nobody will work on this. label May 14, 2021
@gardenappl
Copy link

@gardenappl That is different error, you most likely have disabled sending referrer in Firefox, check https://wiki.mozilla.org/Security/Referrer

Right, it looks like one of my extensions changed that setting, thanks for pointing that out. Weird that Troubleshooting Mode didn't revert that setting to the default.

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label May 25, 2021
@meunierd
Copy link

meunierd commented Jan 14, 2023

I followed the instructions here and am unable to login using my admin credentials. I can see that the login POST request passes the CSRF token. I see the django docs are linked above but I'm not really sure what information I should be using from there?

This is weblate 4.14.1.

@nijel
Copy link
Member

nijel commented Jan 15, 2023

@meunierd Most like it's unrelated, unless you get the same error. CSRF token is passed with every POST request.

@mzch
Copy link

mzch commented Jan 22, 2023

I had the same issue. Adding CSRF_TRUSTED_ORIGINS to settings.py fixed it. Please add it to settings_example.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

5 participants