mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-24 07:21:28 +00:00
- enable CSRF support earlier
- remove rpc/sanityCheck from CSRF-excluded calls
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
class RPC extends Handler_Protected {
|
class RPC extends Handler_Protected {
|
||||||
|
|
||||||
function csrf_ignore($method) {
|
function csrf_ignore($method) {
|
||||||
$csrf_ignored = array("sanitycheck", "completelabels", "saveprofile");
|
$csrf_ignored = array("completelabels", "saveprofile");
|
||||||
|
|
||||||
return array_search($method, $csrf_ignored) !== false;
|
return array_search($method, $csrf_ignored) !== false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -588,6 +588,7 @@ const App = {
|
|||||||
|
|
||||||
this.setLoadingProgress(30);
|
this.setLoadingProgress(30);
|
||||||
this.initHotkeyActions();
|
this.initHotkeyActions();
|
||||||
|
this.enableCsrfSupport();
|
||||||
|
|
||||||
const a = document.createElement('audio');
|
const a = document.createElement('audio');
|
||||||
const hasAudio = !!a.canPlayType;
|
const hasAudio = !!a.canPlayType;
|
||||||
@@ -628,7 +629,6 @@ const App = {
|
|||||||
return errorMsg == "";
|
return errorMsg == "";
|
||||||
},
|
},
|
||||||
initSecondStage: function() {
|
initSecondStage: function() {
|
||||||
this.enableCsrfSupport();
|
|
||||||
|
|
||||||
document.onkeydown = (event) => { return this.hotkeyHandler(event) };
|
document.onkeydown = (event) => { return this.hotkeyHandler(event) };
|
||||||
document.onkeypress = (event) => { return this.hotkeyHandler(event) };
|
document.onkeypress = (event) => { return this.hotkeyHandler(event) };
|
||||||
|
|||||||
Reference in New Issue
Block a user