2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-27 14:24:52 +00:00

fhemweb.js: avoid crash in regexp check (Forum )

git-svn-id: https://svn.fhem.de/fhem/trunk@23453 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-01-01 18:10:12 +00:00
parent 89c3f453a6
commit 084fa0c5e5

@ -1289,13 +1289,17 @@ FW_detailSelect(selEl, mayMissing)
if(selVal != null && selVal != undefined) {
for(var i1=0; i1<listArr.length; i1++) {
var aap = listArr[i1].split(":");
if(selVal.match(new RegExp("^"+aap[0]+"$"))) {
if(aap.length > 2) {
var re = aap.shift();
aap = [re, aap.join(":")];
try {
if(selVal.match(new RegExp("^"+aap[0]+"$"))) {
if(aap.length > 2) {
var re = aap.shift();
aap = [re, aap.join(":")];
}
argAndPar = aap;
fnd = true;
}
argAndPar = aap;
fnd = true;
} catch(e){
log("Problem building regexp from "+listArr[i1]);
}
}
}