mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 02:44:53 +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:
parent
89c3f453a6
commit
084fa0c5e5
@ -1289,6 +1289,7 @@ FW_detailSelect(selEl, mayMissing)
|
|||||||
if(selVal != null && selVal != undefined) {
|
if(selVal != null && selVal != undefined) {
|
||||||
for(var i1=0; i1<listArr.length; i1++) {
|
for(var i1=0; i1<listArr.length; i1++) {
|
||||||
var aap = listArr[i1].split(":");
|
var aap = listArr[i1].split(":");
|
||||||
|
try {
|
||||||
if(selVal.match(new RegExp("^"+aap[0]+"$"))) {
|
if(selVal.match(new RegExp("^"+aap[0]+"$"))) {
|
||||||
if(aap.length > 2) {
|
if(aap.length > 2) {
|
||||||
var re = aap.shift();
|
var re = aap.shift();
|
||||||
@ -1297,6 +1298,9 @@ FW_detailSelect(selEl, mayMissing)
|
|||||||
argAndPar = aap;
|
argAndPar = aap;
|
||||||
fnd = true;
|
fnd = true;
|
||||||
}
|
}
|
||||||
|
} catch(e){
|
||||||
|
log("Problem building regexp from "+listArr[i1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user