bird1: fix "Form token mismatch" errors in luci-app-bird1-ipv{4,6}
authorRoger Pueyo Centelles <roger.pueyo@guifi.net>
Sun, 26 Feb 2023 16:18:19 +0000 (17:18 +0100)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Mon, 6 Mar 2023 20:13:32 +0000 (21:13 +0100)
The "Filters", "Functions" and "Status" sections of the web interfaces
for both Bird4 and Bird6 threw the following error upon performing any
action:

   Form token mismatch
   The submitted security token is invalid or already expired!

Changing their entry types from "cbi" to "form" fixes them.

Fixes #922.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
bird1-openwrt/Makefile
bird1-openwrt/bird1-ipv4-openwrt/src/controller/bird4.lua
bird1-openwrt/bird1-ipv6-openwrt/src/controller/bird6.lua

index c04919fd22f9823358bc8e4e0b100a80baefbf31..1c8d58e3468225b06b6f3703fe4873e39b634388 100644 (file)
@@ -16,7 +16,7 @@ PKG_NAME := $(BIRD1_PKG)-openwrt
 PKG_IPV4_NAME := $(BIRD1_IPV4_PKG)-openwrt
 PKG_IPV6_NAME := $(BIRD1_IPV6_PKG)-openwrt
 PKG_VERSION := 0.3
-PKG_RELEASE := 4
+PKG_RELEASE := 5
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 PKG_LICENSE := GPL-3.0-or-later
 
index d12803a1449e5813d9cc348f7094720f7a6b9cd8..07d0dd283045497710dd447246b65762e97ba987 100644 (file)
@@ -23,7 +23,7 @@ function index()
             _("Bird4"), 0)
 
         entry({"admin", "network", "bird4", "status"},
-            cbi("bird4/status"),
+            form("bird4/status"),
             _("Status"), 0).leaf = true
 
         entry({"admin","network","bird4","log"},
@@ -43,10 +43,10 @@ function index()
             _("BGP Protocol"), 4).leaf = true
 
         entry({"admin","network","bird4","filters"},
-            cbi("bird4/filters"),
+            form("bird4/filters"),
             _("Filters"), 5).leaf = true
 
         entry({"admin","network","bird4","functions"},
-            cbi("bird4/functions"),
+            form("bird4/functions"),
             _("Functions"), 6).leaf = true
 end
index e8ad175c8fd00d2172378988c55ae6f71d546bdc..d955e1f1154b05faf77b75964d625ca8d736107f 100644 (file)
@@ -23,7 +23,7 @@ function index()
             _("Bird6"), 0)
 
         entry({"admin", "network", "bird6", "status"},
-            cbi("bird6/status"),
+            form("bird6/status"),
             _("Status"), 0).leaf = true
 
         entry({"admin","network","bird6","log"},
@@ -43,10 +43,10 @@ function index()
             _("BGP Protocol"), 4).leaf = true
 
         entry({"admin","network","bird6","filters"},
-            cbi("bird6/filters"),
+            form("bird6/filters"),
             _("Filters"), 5).leaf = true
 
         entry({"admin","network","bird6","functions"},
-            cbi("bird6/functions"),
+            form("bird6/functions"),
             _("Functions"), 6).leaf = true
 end