Files
node/lib
Aditi 5dafb48f1a 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-11 15:24:02 +00:00
..
2024-09-24 19:48:15 +00:00
2024-10-09 06:42:16 +00:00
2024-10-09 06:42:16 +00:00
2024-10-09 06:42:16 +00:00
2024-12-15 14:19:27 +00:00
2024-10-17 13:18:28 +00:00
2024-12-06 04:36:24 +00:00
2024-10-09 06:42:16 +00:00
2024-10-09 06:42:16 +00:00
2025-01-04 18:30:04 +00:00
2025-02-10 21:09:41 +00:00
2025-02-01 02:13:57 +00:00