aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/isObviousHtml.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2024-11-05 22:54:34 +0100
committerGitHub <noreply@github.com>2024-11-05 22:54:34 +0100
commitd5ebb464debab6ac39fe065e93c8a7ae1de8547e (patch)
treeae6831aeb0f5071a900b4e341bca93be493b1b2d /src/core/isObviousHtml.js
parent329661fd538a07993a2fcfa2a75fdd7f5667f86c (diff)
downloadjquery-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