ancient-judge-84558
09/12/2023, 5:23 PMThe HTTP Request Header included the "Cookie" key, indicating that this request was made by a Browser. The flow however was initiated as an API request. To prevent potential misuse and mitigate several attack vectors including CSRF, the request has been blocked. Please consult the documentation.
This is new and we are unaware, that we changed anything. Is this a new security measure in Ory?bland-eye-99092
09/12/2023, 5:31 PMancient-judge-84558
09/13/2023, 9:01 AMbland-eye-99092
09/13/2023, 9:01 AMsteep-lamp-91158
steep-lamp-91158
magnificent-energy-493
careful-pager-12918
12/05/2023, 2:52 PMsteep-lamp-91158
curl -v <https://playground.projects.oryapis.com/self-service/login>
...
< set-cookie: __cf_bm=3ZH8roaDORRxGcS9rIi5jRwhd2cIV_UF_4My7iBc0pQ-1701789582-0-ActrA/dyx7eGxZh5NrQ0p9gLHc9IXLT9PzKaKW53AmRR9gsJ6zg69t63jOXYjf9Qu4EymJCD1ErGYVrnPbWXtfo=; path=/; expires=Tue, 05-Dec-23 15:49:42 GMT; domain=.<http://oryapis.com|oryapis.com>; HttpOnly; Secure; SameSite=None
< set-cookie: __cflb=04dTob4edYf9Yrm7QzafdrhbBpLwWnvywCMW1VfhxP; SameSite=None; Secure; path=/; expires=Tue, 05-Dec-23 16:19:42 GMT; HttpOnly
< set-cookie: _cfuvid=0EgIOcmZAgR3nDKMTKHqcVjdM59KUPHkk2h3BG5Vc_U-1701789582602-0-604800000; path=/; domain=.<http://oryapis.com|oryapis.com>; HttpOnly; Secure; SameSite=None
...
careful-pager-12918
12/05/2023, 3:29 PMcareful-pager-12918
12/05/2023, 4:04 PMconst newSource = {
headers: { 'X-Session-Token': sessionToken, Cookies: '' },
uri: currentURI,
};
Right now, it blocks at the second step (Ory) with this error below. The error id is "645008c-1140-41...." Unfortunately, I don't have the full code, we got this screenshot from a clientsteep-lamp-91158
steep-lamp-91158
careful-pager-12918
12/05/2023, 4:07 PMcareful-pager-12918
12/05/2023, 4:07 PMcareful-pager-12918
12/05/2023, 4:08 PMsteep-lamp-91158
careful-pager-12918
12/05/2023, 4:08 PMcareful-pager-12918
12/05/2023, 4:08 PMsteep-lamp-91158
steep-lamp-91158
"details":{"docs":"<https://www.ory.sh/kratos/docs/debug/csrf>","hint":"The anti-CSRF cookie was found but the CSRF token was not included in the HTTP request body (csrf_token) nor in the HTTP Header (X-CSRF-Token).","reject_reason":"The HTTP Cookie Header was set and a CSRF token was sent but they do not match. We recommend deleting all cookies for this domain and retrying the flow."
careful-pager-12918
12/05/2023, 4:18 PMcareful-pager-12918
12/05/2023, 4:21 PMcareful-pager-12918
12/05/2023, 4:29 PMastonishing-appointment-3757
02/14/2024, 6:19 PMbulky-teacher-81743
02/15/2024, 7:13 PMearly-oil-83208
02/16/2024, 3:19 PM"details":{"docs":"<https://www.ory.sh/kratos/docs/debug/csrf>","hint":"The anti-CSRF cookie was found but the CSRF token was not included in the HTTP request body (csrf_token) nor in the HTTP Header (X-CSRF-Token).","reject_reason":"The HTTP Cookie Header was set and a CSRF token was sent but they do not match. We recommend deleting all cookies for this domain and retrying the flow."
The hint
and reject_reason
seem to contradict each other:
"hint":"The anti-CSRF cookie was found but the CSRF token was not included in the HTTP request body (csrf_token) nor in the HTTP Header (X-CSRF-Token)."
"reject_reason":"The HTTP Cookie Header was set and a CSRF token was sent but they do not match. We recommend deleting all cookies for this domain and retrying the flow."
bulky-teacher-81743
02/17/2024, 8:43 PMearly-oil-83208
02/19/2024, 9:08 AMhint
says the crsf_token
is missing, but the reject_reason
says it's present (but doesn't match the cookie) 🤔