summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-opkg/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-09-30 09:59:39 +0200
committerJo-Philipp Wich <jo@mein.io>2022-09-30 09:59:39 +0200
commit84ba6a5c36072f74721d535104735757b005c8d6 (patch)
tree1e7750bb2929f23708945a49963bc8db6ae97738 /applications/luci-app-opkg/htdocs/luci-static
parent3393e15815f116b33e90b5f58050cfedebe00fe2 (diff)
luci-app-opkg: relax dependency parsing
Align depdendency parse logic with opkg to properly process certain malformed dependency specifications. In particular do not require a depdendency specification to end after the closing paren of a version constraint and perform non-greedy matching in order to extract the first version constraint only. Fixes: #5997 Ref: https://forum.openwrt.org/t/x/138328 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg/htdocs/luci-static')
-rw-r--r--applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
index 311078a22c..dd69161c82 100644
--- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
+++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
@@ -601,7 +601,7 @@ function renderDependencies(depends, info, flat)
if (deps[i] === 'libc')
continue;
- if (deps[i].match(/^(.+)\s+\((<=|>=|<<|>>|<|>|=)(.+)\)$/)) {
+ if (deps[i].match(/^(.+?)\s+\((<=|>=|<<|>>|<|>|=)(.+?)\)/)) {
dep = RegExp.$1.trim();
vop = RegExp.$2.trim();
ver = RegExp.$3.trim();