From ceb490df59d23664e409af991e578122e259a65d Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Mon, 17 Jul 2023 16:09:45 +0200 Subject: [PATCH] luci-app-banip: fix URL regex in custom feed editor - accept special chars for BASIC AUTH in URL Signed-off-by: Dirk Brenken --- .../htdocs/luci-static/resources/view/banip/feeds.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/feeds.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/feeds.js index 267ca410f7..0e4e682986 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/feeds.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/feeds.js @@ -205,7 +205,7 @@ return view.extend({ if (!value) { return true; } - if (!value.match(/^(http:\/\/|https:\/\/)[A-Za-z0-9\/\.\-_\?\&\+=~#]+$/)) { + if (!value.match(/^(http:\/\/|https:\/\/)[A-Za-z0-9\/\.\-\?\&\+_@%=:~#]+$/)) { return _('Protocol/URL format not supported'); } return true; @@ -218,7 +218,7 @@ return view.extend({ if (!value) { return true; } - if (!value.match(/^(http:\/\/|https:\/\/)[A-Za-z0-9\/\.\-_\?\&\+=:~#]+$/)) { + if (!value.match(/^(http:\/\/|https:\/\/)[A-Za-z0-9\/\.\-\?\&\+_@%=:~#]+$/)) { return _('Protocol/URL format not supported'); } return true; -- 2.30.2