fix(security): unsafe use of eval() for code execution
Multiple JavaScript rule files use eval() to parse dynamic content, allowing arbitrary code execution if the server returns malicious data. Found in js/海洋听书.js, js/有声小说吧.js and others. Affected files: 海洋听书.js Signed-off-by: tuanaiseo <[email protected]>
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ var rule = {
|
|||||||
let v = pd(html, ".booksite&&script&&Html");
|
let v = pd(html, ".booksite&&script&&Html");
|
||||||
var document = {};
|
var document = {};
|
||||||
var VideoListJson;
|
var VideoListJson;
|
||||||
VideoListJson = eval(v.split("VideoListJson=")[1].split(",urlinfo")[0]);
|
VideoListJson = JSON.parse(v.split("VideoListJson=")[1].split(",urlinfo")[0]);
|
||||||
// log(typeof VideoListJson);
|
// log(typeof VideoListJson);
|
||||||
let list1 = VideoListJson[0][1];
|
let list1 = VideoListJson[0][1];
|
||||||
LISTS = [list1];
|
LISTS = [list1];
|
||||||
|
|||||||
Reference in New Issue
Block a user