Skip to content

Commit 3696d66

Browse files
committed
luci-app-banip: update 1.8.0-3
* more eslint fixes Signed-off-by: Dirk Brenken <dev@brenken.org>
1 parent 2a8230d commit 3696d66

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

applications/luci-app-banip/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for banIP
77
LUCI_DEPENDS:=+luci-base +banip
88

99
PKG_VERSION:=1.8.0
10-
PKG_RELEASE:=2
10+
PKG_RELEASE:=3
1111
PKG_LICENSE:=Apache-2.0
1212
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
1313

applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ return view.extend({
353353
o.optional = true;
354354
o.rmempty = true;
355355

356-
o = s.taboption('adv_chain', form.Value, 'ban_allowflag', _('Allow Protocol/Ports'), _('Always allow a protocol \(tcp/udp\) with certain ports or port ranges in WAN-Input and WAN-Forward chain.'));
356+
o = s.taboption('adv_chain', form.Value, 'ban_allowflag', _('Allow Protocol/Ports'), _('Always allow a protocol (tcp/udp) with certain ports or port ranges in WAN-Input and WAN-Forward chain.'));
357357
o.placeholder = 'tcp 80 443-445';
358358
o.rmempty = true;
359359

@@ -603,7 +603,7 @@ return view.extend({
603603
if (!value) {
604604
return _('Empty field not allowed');
605605
}
606-
if (!value.match(/^[A-Za-z0-9\.\:]+$/)) {
606+
if (!value.match(/^[A-Za-z0-9.:]+$/)) {
607607
return _('Invalid characters');
608608
}
609609
return true;
@@ -739,8 +739,8 @@ return view.extend({
739739
if (!value) {
740740
return true;
741741
}
742-
if (!value.match(/^(http:\/\/|https:\/\/)[A-Za-z0-9\/\.\-_\?\&\+=:~#]+$/)) {
743-
return _('Protocol/URL format not supported');
742+
if (!value.match(/^(https?:\/\/)[A-Za-z0-9-]+\.[A-Za-z0-9.-]+(:[0-9]+)?(\/[A-Za-z0-9._\-?&+=:~#%]*)?$/)) {
743+
return _('Invalid URL format');
744744
}
745745
return true;
746746
}
@@ -775,13 +775,15 @@ return view.extend({
775775
o.rmempty = true;
776776

777777
o = s.taboption('feeds', form.Value, 'ban_nftexpiry', _('Blocklist Set Expiry'), _('Expiry time for auto added blocklist Set members.'));
778+
o.value('30ms');
778779
o.value('10s');
779780
o.value('1m');
780781
o.value('5m');
781782
o.value('1h');
782783
o.value('2h');
783784
o.value('1d');
784785
o.value('7d');
786+
o.value('2w');
785787
o.placeholder = _('-- default --');
786788
o.optional = true;
787789
o.rmempty = true;

0 commit comments

Comments
 (0)