diff --git a/gecoosac/Makefile b/gecoosac/Makefile
index 2a546dcee..5bddf9d9c 100644
--- a/gecoosac/Makefile
+++ b/gecoosac/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gecoosac
PKG_VERSION:=2.2.20251015
-PKG_RELEASE:=11
+PKG_RELEASE:=12
ifeq ($(ARCH),aarch64)
PKG_ARCH:=ac_linux_arm64
diff --git a/gecoosac/files/etc/init.d/gecoosac b/gecoosac/files/etc/init.d/gecoosac
index f7a8217b7..67629e4f3 100644
--- a/gecoosac/files/etc/init.d/gecoosac
+++ b/gecoosac/files/etc/init.d/gecoosac
@@ -43,28 +43,22 @@ is_abs_path() {
esac
}
-strip_trailing_slashes() {
- local path="$1"
-
- while [ "$path" != "/" ] && [ "${path%/}" != "$path" ]; do
- path="${path%/}"
- done
-
- printf '%s\n' "$path"
-}
-
normalize_path() {
local path="$1"
- local old_ifs part normalized parent
+ local part normalized parent
is_abs_path "$path" || return 1
normalized="/"
- old_ifs="$IFS"
- IFS=/
- set -- $path
- IFS="$old_ifs"
+ path="${path#/}"
+
+ while [ -n "$path" ]; do
+ part="${path%%/*}"
+ if [ "$part" = "$path" ]; then
+ path=""
+ else
+ path="${path#*/}"
+ fi
- for part in "$@"; do
case "$part" in
""|.) ;;
..)
@@ -171,22 +165,25 @@ run_with_timeout() {
}
is_ipv4() {
- local old_ifs part
+ local value="$1"
+ local part count
- old_ifs="$IFS"
- IFS=.
- set -- $1
- IFS="$old_ifs"
+ count=0
+
+ while :; do
+ part="${value%%.*}"
+ count=$((count + 1))
- [ "$#" -eq 4 ] || return 1
- for part in "$@"; do
case "$part" in
""|*[!0-9]*) return 1 ;;
esac
[ "$part" -le 255 ] 2>/dev/null || return 1
+
+ [ "$part" != "$value" ] || break
+ value="${value#*.}"
done
- return 0
+ [ "$count" -eq 4 ]
}
san_has_entry() {
diff --git a/gecoosac/files/etc/uci-defaults/gecoosac b/gecoosac/files/etc/uci-defaults/gecoosac
index 854db1096..768217fe9 100644
--- a/gecoosac/files/etc/uci-defaults/gecoosac
+++ b/gecoosac/files/etc/uci-defaults/gecoosac
@@ -24,28 +24,22 @@ set_default() {
changed=1
}
-strip_trailing_slashes() {
- local path="$1"
-
- while [ "$path" != "/" ] && [ "${path%/}" != "$path" ]; do
- path="${path%/}"
- done
-
- printf '%s\n' "$path"
-}
-
normalize_path() {
local path="$1"
- local old_ifs part normalized parent
+ local part normalized parent
is_abs_path "$path" || return 1
normalized="/"
- old_ifs="$IFS"
- IFS=/
- set -- $path
- IFS="$old_ifs"
+ path="${path#/}"
+
+ while [ -n "$path" ]; do
+ part="${path%%/*}"
+ if [ "$part" = "$path" ]; then
+ path=""
+ else
+ path="${path#*/}"
+ fi
- for part in "$@"; do
case "$part" in
""|.) ;;
..)
diff --git a/luci-app-gecoosac/Makefile b/luci-app-gecoosac/Makefile
index 436bcf666..61f79aef7 100644
--- a/luci-app-gecoosac/Makefile
+++ b/luci-app-gecoosac/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-gecoosac
PKG_VERSION:=2.2
-PKG_RELEASE:=13
+PKG_RELEASE:=14
LUCI_TITLE:=LuCI Support for gecoosac
LUCI_DEPENDS:=+luci-base +gecoosac
diff --git a/luci-app-gecoosac/htdocs/luci-static/resources/view/gecoosac.js b/luci-app-gecoosac/htdocs/luci-static/resources/view/gecoosac.js
index f39e42c7e..7adcabd03 100644
--- a/luci-app-gecoosac/htdocs/luci-static/resources/view/gecoosac.js
+++ b/luci-app-gecoosac/htdocs/luci-static/resources/view/gecoosac.js
@@ -34,15 +34,6 @@ function validPort(value, defaultValue) {
return Number.isInteger(port) && port >= 1 && port <= 65535 ? String(port) : defaultValue;
}
-function stripTrailingSlashes(value) {
- let path = String(value || '');
-
- while (path.length > 1 && path.endsWith('/'))
- path = path.slice(0, -1);
-
- return path;
-}
-
function normalizePath(value) {
const path = String(value || '');
@@ -256,7 +247,7 @@ return view.extend({
o.depends({ isonlyoneprot: '0', https: '1' });
o = s.option(form.Value, 'upload_dir', _('Upload dir path'),
- _('Upload AP upgrade firmware here. Use an absolute path ending with /gecoosac/upload, for example /tmp/gecoosac/upload.\nDo not place it under /etc/gecoosac because that directory is backed up during sysupgrade.'));
+ _('Upload AP upgrade firmware here. Use an absolute path ending with /gecoosac/upload, for example /tmp/gecoosac/upload.
Do not place it under /etc/gecoosac because that directory is backed up during sysupgrade.'));
uploadDirOption = o;
o.placeholder = DEFAULT_UPLOAD_DIR;
o.default = DEFAULT_UPLOAD_DIR;
diff --git a/luci-app-gecoosac/po/zh_Hans/gecoosac.po b/luci-app-gecoosac/po/zh_Hans/gecoosac.po
index d4a3be5a8..e378c3782 100644
--- a/luci-app-gecoosac/po/zh_Hans/gecoosac.po
+++ b/luci-app-gecoosac/po/zh_Hans/gecoosac.po
@@ -53,13 +53,13 @@ msgstr "上传目录"
msgid ""
"Upload AP upgrade firmware here. Use an absolute path ending with "
-"/gecoosac/upload, for example /tmp/gecoosac/upload.\n"
-"Do not place it under /etc/gecoosac because that directory is backed up "
+"/gecoosac/upload, for example /tmp/gecoosac/upload.
Do not place it "
+"under /etc/gecoosac because that directory is backed up "
"during sysupgrade."
msgstr ""
"AP 升级固件会上传到此目录。请使用以 /gecoosac/upload 结尾的绝对路径,例如 "
-"/tmp/gecoosac/upload。\n"
-"不要放在 /etc/gecoosac 下,因为该目录会在 sysupgrade 时被备份。"
+"/tmp/gecoosac/upload。
不要放在 /etc/gecoosac 下,因为该目录会在 "
+"sysupgrade 时被备份。"
msgid "Upload directory must be an absolute path ending with /gecoosac/upload and must not be under /etc/gecoosac."
msgstr "上传目录必须是以 /gecoosac/upload 结尾的绝对路径,且不能位于 /etc/gecoosac 下。"
diff --git a/luci-app-gecoosac/po/zh_Hant/gecoosac.po b/luci-app-gecoosac/po/zh_Hant/gecoosac.po
index a6b965ceb..607f2678c 100644
--- a/luci-app-gecoosac/po/zh_Hant/gecoosac.po
+++ b/luci-app-gecoosac/po/zh_Hant/gecoosac.po
@@ -53,13 +53,13 @@ msgstr "上傳目錄"
msgid ""
"Upload AP upgrade firmware here. Use an absolute path ending with "
-"/gecoosac/upload, for example /tmp/gecoosac/upload.\n"
-"Do not place it under /etc/gecoosac because that directory is backed up "
+"/gecoosac/upload, for example /tmp/gecoosac/upload.
Do not place it "
+"under /etc/gecoosac because that directory is backed up "
"during sysupgrade."
msgstr ""
"AP 升級韌體會上傳到此目錄。請使用以 /gecoosac/upload 結尾的絕對路徑,例如 "
-"/tmp/gecoosac/upload。\n"
-"不要放在 /etc/gecoosac 下,因為該目錄會在 sysupgrade 時被備份。"
+"/tmp/gecoosac/upload。
不要放在 /etc/gecoosac 下,因為該目錄會在 "
+"sysupgrade 時被備份。"
msgid "Upload directory must be an absolute path ending with /gecoosac/upload and must not be under /etc/gecoosac."
msgstr "上傳目錄必須是以 /gecoosac/upload 結尾的絕對路徑,且不能位於 /etc/gecoosac 下。"
diff --git a/luci-app-gecoosac/root/usr/libexec/rpcd/luci.gecoosac b/luci-app-gecoosac/root/usr/libexec/rpcd/luci.gecoosac
index 389891d11..2e9970180 100755
--- a/luci-app-gecoosac/root/usr/libexec/rpcd/luci.gecoosac
+++ b/luci-app-gecoosac/root/usr/libexec/rpcd/luci.gecoosac
@@ -17,19 +17,9 @@ json_result() {
json_cleanup
}
-strip_trailing_slashes() {
- local path="$1"
-
- while [ "$path" != "/" ] && [ "${path%/}" != "$path" ]; do
- path="${path%/}"
- done
-
- printf '%s\n' "$path"
-}
-
normalize_path() {
local path="$1"
- local old_ifs part normalized parent
+ local part normalized parent
case "$path" in
/*) ;;
@@ -37,12 +27,16 @@ normalize_path() {
esac
normalized="/"
- old_ifs="$IFS"
- IFS=/
- set -- $path
- IFS="$old_ifs"
+ path="${path#/}"
+
+ while [ -n "$path" ]; do
+ part="${path%%/*}"
+ if [ "$part" = "$path" ]; then
+ path=""
+ else
+ path="${path#*/}"
+ fi
- for part in "$@"; do
case "$part" in
""|.) ;;
..)
diff --git a/natflow/Makefile b/natflow/Makefile
index 0ae9bba50..42ed5d8b7 100644
--- a/natflow/Makefile
+++ b/natflow/Makefile
@@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=natflow
PKG_VERSION:=20260531
-PKG_RELEASE:=15
+PKG_RELEASE:=16
PKG_SOURCE:=$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ptpt52/natflow.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=a49c7f9398a70a16d16e11174db23fe917878c47
+PKG_SOURCE_VERSION:=804f71f7e21827961ac35469b97c2cddc7c381cb
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Chen Minqiang
PKG_LICENSE:=GPL-2.0