Use X-Requested-With header instead of the ajax parameter#7684
Use X-Requested-With header instead of the ajax parameter#7684Inverle wants to merge 18 commits intoFreshRSS:edgefrom
X-Requested-With header instead of the ajax parameter#7684Conversation
|
Problem: also TODO: update docs so they say to use the |
|
See also FreshRSS/docs/en/users/09_refreshing_feeds.md Lines 61 to 84 in 51298cd |
|
I think we should start by forbidding the |
We can't do that because it's needed for the slider (unless we remove it)
|
|
@Alkarex Should I generate the .po files too? |
X-Requested-With header instead of the ajax parameterX-Ajax header instead of the ajax parameter
|
Now that po4a has a sufficiently high version on GHA I was hoping to automate something about that but I haven't found the time. A few years ago I'd have needed to add compilation or a custom Docker image which seemed like too much effort but perhaps that was a bad choice because of course everybody forgets or doesn't even know about it. :-) |
Related to FreshRSS#7684 The form buttons requiring confirmation are disabled in HTML in the case of Ajax, and only enabled again if our own JavaScript is running
* Fixes * Rename `X-Ajax` back to `X-Requested-With` again (with required value of `FreshRSS`)
X-Ajax header instead of the ajax parameterX-Requested-With header instead of the ajax parameter
Frenzie
left a comment
There was a problem hiding this comment.
lgtm, probably needs more testing though ;-)
|
Sorry 😓, but I am not so glad of this PR and would like to pursue an alternative instead: My reasoning is that:
I hope that makes sense 🙈 |
|
That's fine, I do realize that my PR isn't necessarily the best solution given these circumstances.
I think it would be a good addition to also require a separate "CSRF token" for AJAX requests, just as @Frenzie suggested before, to cover other buttons than those marked with |
Related to #7684 The form buttons requiring confirmation are disabled in HTML in the case of Ajax, and only enabled again if our own JavaScript is running
Yes, good idea. Help welcome |
Prevents unintended use of
ajaxin requests.