diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2024-11-05 22:54:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-05 22:54:34 +0100 |
commit | d5ebb464debab6ac39fe065e93c8a7ae1de8547e (patch) | |
tree | ae6831aeb0f5071a900b4e341bca93be493b1b2d /src/core/isObviousHtml.js | |
parent | 329661fd538a07993a2fcfa2a75fdd7f5667f86c (diff) | |
download | jquery-d5ebb464debab6ac39fe065e93c8a7ae1de8547e.tar.gz jquery-d5ebb464debab6ac39fe065e93c8a7ae1de8547e.zip |
Build: Make middleware-mockserver not crash on reading nonexistent files
`fs.readFileSync` crashes when a non-existing file is passed to it. Some APIs
of `middleware-mockserver` read a file the path of which depends on query
parameters, making it possible to crash it by providing such a parameter. The
old PHP server doesn't have these issues.
To fix this, wrap all `fs.readFileSync` occurrences with a function that falls
back to the string `"ERROR"`.
Closes gh-5579
Diffstat (limited to 'src/core/isObviousHtml.js')
0 files changed, 0 insertions, 0 deletions