Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Add blank JS to prevent unauthorized requests
Sander Dorigo33df73f83054
diff --git a/resources/assets/v3/js/boot/blank-bootstrap.js b/resources/assets/v3/js/boot/blank-bootstrap.jsnew file mode 100644index 0000000000..3fb8d72a2b--- /dev/null+++ b/resources/assets/v3/js/boot/blank-bootstrap.js@@ -0,0 +1,25 @@+/*+ * bootstrap.js+ * Copyright (c) 2026 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++// JS+import "bootstrap"+import "admin-lte"++window.bootstrapped = false;diff --git a/resources/assets/v3/js/pages/blank.js b/resources/assets/v3/js/pages/blank.jsnew file mode 100644index 0000000000..90ff2e2ba4--- /dev/null+++ b/resources/assets/v3/js/pages/blank.js@@ -0,0 +1,21 @@+/*+ * dashboard.js+ * Copyright (c) 2026 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import '../boot/blank-bootstrap.js';diff --git a/resources/assets/v3/vite.config.js b/resources/assets/v3/vite.config.jsindex ff4d009ef3..4692e982aa 100644--- a/resources/assets/v3/vite.config.js+++ b/resources/assets/v3/vite.config.js@@ -46,6 +46,7 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {// generic'js/pages/generic.js',+ 'js/pages/blank.js', // small bootstrap// accountsdiff --git a/resources/views/layout/v3/auth.blade.php b/resources/views/layout/v3/auth.blade.phpindex 45ef67dba0..ce0654655b 100644--- a/resources/views/layout/v3/auth.blade.php+++ b/resources/views/layout/v3/auth.blade.php@@ -36,7 +36,7 @@</div>@yield('content')</div>-@vite(['js/pages/generic.js'])+@vite(['js/pages/blank.js'])@yield('scripts')</body>diff --git a/resources/views/layout/v3/blank.blade.php b/resources/views/layout/v3/blank.blade.phpindex 918c49aad3..e89ba98d48 100644--- a/resources/views/layout/v3/blank.blade.php+++ b/resources/views/layout/v3/blank.blade.php@@ -43,7 +43,7 @@</div></div></main>-@vite(['js/pages/generic.js'])+@vite(['js/pages/blank.js'])</body></html>diff --git a/resources/views/layout/v3/debug.blade.php b/resources/views/layout/v3/debug.blade.phpindex a1cc13c5bb..2e849f3cdc 100644--- a/resources/views/layout/v3/debug.blade.php+++ b/resources/views/layout/v3/debug.blade.php@@ -52,7 +52,7 @@</div></div></main>-@vite(['js/pages/generic.js'])+@vite(['js/pages/blank.js'])</body></html>