Add clarification to API behavior with respect to CSRF and cookies - #1323
Add clarification to API behavior with respect to CSRF and cookies#1323manedurphy wants to merge 3 commits into
Conversation
Signed-off-by: Dane Murphy <danem7@gmail.com>
✅ Deploy Preview for pihole-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@DL6ER Can you check this over and see if it lines up with the API design please? |
|
The header rename is correct. The rest lines up with the code as well. CSRF is only checked for cookie-sourced SIDs ( One correction: the |
DL6ER
left a comment
There was a problem hiding this comment.
Please drop CSRF from the auth DELETE example. Thereafter, good to be merged. Sorry for the very long review, I simply missed the ping and found this by pure luck while skimming over old PRs.
Thank you for your contribution to the Pi-hole Community!
Please read the comments below to help us consider your Pull Request.
We are all volunteers and completing the process outlined will help us review your commits quicker.
Please make sure you
What does this PR aim to accomplish?:
X-FTL-CSRFheader, but the code shows that the header is namedX-CSRF-TOKEN, see here.X-FTL-CSRFin scenarios where the code/script run outside of the browser. This is misleading, as those example do not explicitly opt-in for cookie-based authentication.sidvalue in the request URI in additional to setting the CSRF token, which is also misleading because in a browser we would expect the cookie to be set automatically, which the API checks before checking the request URI.How does this PR accomplish the above?:
Link documentation PRs if any are needed to support this PR:
By submitting this pull request, I confirm the following:
git rebase)