serenity/Userland/Libraries/LibJS
Andreas Kling 9054b1bc14 LibJS: Always taint parsing environment on call to eval()
We had an edge case where calls to eval() left the environment untainted
*if* `eval` had also been declared as a local variable in the same
parsing context.

This broke the expected direct eval behavior when the variable `eval`
was still pointing at the global `eval` function.

This patch fixes the issue by simply always tainting the environment
when a call to something named `eval` is encountered. It doesn't seem
worth worrying about optimizing the case where someone is calling their
own function named `eval`..

Fixes 1 test-js test in bytecode mode. :^)
2023-07-21 14:14:00 +02:00
..
Bytecode LibJS/Bytecode: Use primitive this for strict mode GetByValue 2023-07-21 14:14:00 +02:00
Contrib/Test262 LibJS: Do not use the $ special character in file names 2023-07-15 11:09:22 -04:00
Heap LibWeb+LibJS: Move some code around to make CSS/Parser parse faster 2023-07-11 09:38:37 +03:30
Runtime LibJS/Bytecode: Rename RegisterWindow to CallFrame 2023-07-21 14:14:00 +02:00
Tests LibJS: Disallow negative set record sizes 2023-07-18 12:31:10 +01:00
AST.cpp LibJS: Delete Declaration::for_each_var_declared_name 2023-07-20 20:19:15 +02:00
AST.h LibJS: Delete Declaration::for_each_var_declared_name 2023-07-20 20:19:15 +02:00
CMakeLists.txt LibJS+LibWeb: Move IteratorOperations.h AOs to Iterator.h 2023-07-19 14:11:43 +01:00
Console.cpp LibJS: Begin implementing console.dir 2023-06-22 06:46:27 +02:00
Console.h LibJS: Begin implementing console.dir 2023-06-22 06:46:27 +02:00
CyclicModule.cpp
CyclicModule.h
Forward.h LibJS: Forward declare the MemberExpression AST node 2023-07-07 18:11:51 +02:00
Interpreter.cpp LibJS/Bytecode: Leave GlobalDeclarationInstantiation in C++ 2023-06-16 08:40:45 +02:00
Interpreter.h
Lexer.cpp
Lexer.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
MarkupGenerator.cpp LibJS: Fix redundancy-detection when printing raw values 2023-06-15 08:09:16 +02:00
MarkupGenerator.h LibJS: Fix redundancy-detection when printing raw values 2023-06-15 08:09:16 +02:00
Module.cpp
Module.h
Parser.cpp LibJS: Always taint parsing environment on call to eval() 2023-07-21 14:14:00 +02:00
Parser.h LibJS: Identify global variables during parsing 2023-07-12 16:03:16 +02:00
ParserError.cpp
ParserError.h
Print.cpp LibJS: Allow GeneratorObject to be subclassed 2023-07-16 23:56:55 +01:00
Print.h
SafeFunction.h
Script.cpp
Script.h
SourceCode.cpp
SourceCode.h
SourceRange.h
SourceTextModule.cpp LibJS: Delete Declaration::for_each_var_declared_name 2023-07-20 20:19:15 +02:00
SourceTextModule.h LibJS: Implement import.meta for bytecode 2023-07-14 06:06:04 +02:00
SyntaxHighlighter.cpp
SyntaxHighlighter.h
SyntheticModule.cpp
SyntheticModule.h
Token.cpp
Token.h