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

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

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

View File

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