ladybird/Libraries/LibJS
Timothy Flynn edaed9adfa LibJS: Protect DateParser from non-ASCII input
DateParser is a GenericLexer, which is not particularly UTF-8 aware.
Other engines do not accept ASCII input, so let's just reject non-ASCII
strings outright.

While we are here, let's avoid the std ctype header. It is explicitly
undefined behavior to provide code points to isspace, isalpha, etc. that
do not fit in an unsigned char. Although this isn't reachable any longer
let's just nip it in the bud and use our safe AK character types.

Just to demonstrate, the following returns different values for me on
different systems and with different compilers:

    isdigit(0xff01)
    isalpha(0xff01)
    isspace(0xff01)
2026-05-22 17:30:36 +02:00
..
AsmIntGen LibJS: Add asmint tag assertions 2026-05-03 13:10:48 +02:00
Bytecode LibJS: Preserve runtime caches across executable swaps 2026-05-22 10:54:44 +02:00
BytecodeDef LibJS: Infer computed property function names 2026-05-22 01:56:57 +02:00
Contrib/Test262 LibJS: Remove gc from the global object 2026-04-24 18:36:23 +02:00
Heap LibJS: Eliminate GeneratorResult GC cell allocation on yield/await 2026-03-20 15:57:23 -05:00
Runtime LibJS: Protect DateParser from non-ASCII input 2026-05-22 17:30:36 +02:00
Rust LibJS: Preserve strict unresolvable assignment references 2026-05-22 14:30:35 +02:00
CMakeLists.txt LibJS+LibWeb: Keep cached script source text lazy 2026-05-18 09:18:35 +02:00
Console.cpp LibGC: Default-construct RootVector from the global heap 2026-05-20 20:37:55 +02:00
Console.h LibJS+LibWeb: Make DOMException hold an [[ErrorData]] slot 2026-04-08 20:33:53 +02:00
CyclicModule.cpp LibJS: Track async module evaluation order 2026-05-22 01:56:57 +02:00
CyclicModule.h LibJS: Track async module evaluation order 2026-05-22 01:56:57 +02:00
ExecutableBacking.h LibJS: Add executable backing state 2026-05-22 10:54:44 +02:00
Forward.h LibJS: Store AlreadyResolved bit on the resolve function itself 2026-05-02 20:24:47 +02:00
LocalVariable.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
Module.cpp LibGC: Default-construct RootHashTable from the global heap 2026-05-20 20:37:55 +02:00
Module.h LibJS: Adopt RootVector for module linking/evaluation stacks 2026-05-19 19:24:08 +02:00
ModuleEntry.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
ModuleLoading.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ParserError.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
ParserError.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
Position.h LibJS: Drop source ranges from bytecode source maps 2026-05-14 09:41:03 +02:00
Print.cpp LibGC: Default-construct RootHashTable from the global heap 2026-05-20 20:37:55 +02:00
Print.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
RustIntegration.cpp LibJS: Track shared function data ownership 2026-05-22 10:54:44 +02:00
RustIntegration.h LibJS: Track shared function data ownership 2026-05-22 10:54:44 +02:00
Script.cpp LibJS: Route bytecode cache installs through owners 2026-05-22 10:54:44 +02:00
Script.h LibJS: Route bytecode cache installs through owners 2026-05-22 10:54:44 +02:00
SourceCode.cpp LibJS: Lazily map UTF-8 source offsets 2026-05-19 17:58:08 +02:00
SourceCode.h LibJS: Lazily map UTF-8 source offsets 2026-05-19 17:58:08 +02:00
SourceRange.h LibJS: Drop source ranges from bytecode source maps 2026-05-14 09:41:03 +02:00
SourceTextModule.cpp LibJS: Route bytecode cache installs through owners 2026-05-22 10:54:44 +02:00
SourceTextModule.h LibJS: Route bytecode cache installs through owners 2026-05-22 10:54:44 +02:00
SyntaxHighlighter.cpp Meta: Remove ENABLE_RUST build configuration option 2026-04-02 22:59:42 +02:00
SyntaxHighlighter.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SyntheticModule.cpp LibJS+LibWeb: Adopt RootHashTable for unrooted GC-pointer storage 2026-05-19 19:24:08 +02:00
SyntheticModule.h LibJS+LibWeb: Adopt RootHashTable for unrooted GC-pointer storage 2026-05-19 19:24:08 +02:00
Token.h LibJS: Remove C++ lexer, use Rust tokenizer for syntax highlighting 2026-03-19 21:55:10 -05:00