Files
node/test/parallel
Aditi a274b28857 module: fix require.resolve() crash on non-string paths
Previously, `require.resolve()` could crash when:
- The first parameter was a relative path and
- The `paths` array contained non-string entries

This commit fixes the issue by adding a check in
`Module._findPath` to ensure all elements in `paths`
are strings, and adding a validation in `stat` before
calling `InternalModuleStat` to guard against
non-string filenames.

PR-URL: https://github.com/nodejs/node/pull/56942
Fixes: https://github.com/nodejs/node/issues/47698
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-12 09:34:56 +01:00
..
2024-09-28 13:58:55 +00:00
2024-09-28 13:58:55 +00:00
2024-09-14 14:09:11 +00:00
2024-09-26 08:24:39 +00:00
2024-12-02 09:41:24 +01:00
2024-09-28 13:58:55 +00:00
2024-09-28 13:58:55 +00:00
2024-09-28 13:58:55 +00:00
2025-02-10 15:15:04 +01:00
2025-02-10 15:15:04 +01:00
2025-02-10 15:15:04 +01:00