Skip to content

Unable to login, CSRF verification failed #93

Open
@spiwocoal

Description

@spiwocoal

I can't seem to send code to Leetcode from Emacs, every time I try using leetcode-try, I get an error with status code 499, and a HTML doc saying the CSRF verification failed, and that I need to enable cookies on my browser. The part with the status code is:

HTTP/1.1 499 Unknown Status Code
Date: Mon, 30 Aug 2021 22:33:24 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: DENY
Vary: Cookie
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=X9mUHu33hCDvO6OxEPSIhTVgD9DvAMNen4qI%2BtJsSVYhkdkqrc%2Bpw5phA2zGOpkPvV6Cb23Qn%2BYC91hue02uH5492o2TmlIQW%2FAtlMdjjo7GEv3tvIisJbnfnPqAQg%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: 68717b07cf3885aa-SCL

Weird thing is, I checked my_cookies was working properly and that Emacs had access to the appropriate cookies (and that I was logged in to Leetcode), so I have no idea why this could be happening.

  • OS: OpenSuse Tumbleweed
  • Browser: Firefox 89.0.2
  • Emacs 27.2 with Doom v3.0.0-alpha

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions