process: disallow some uses of Object.defineProperty() on process.env

Disallow the use of Object.defineProperty() to hide entries in
process.env or make them immutable.

PR-URL: https://github.com/nodejs/node/pull/28006
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Himself65 authored and GitHub committed 2022-04-04 09:24:17 +01:00
1 parent df20947e69
commit e6a7300a10
6 files changed
+151 -3

No files matched your search

+7
View File
@@ -1921,6 +1921,13 @@ valid.
The imported module string is an invalid URL, package name, or package subpath
specifier.
<a id="ERR_INVALID_OBJECT_DEFINE_PROPERTY"></a>
### `ERR_INVALID_OBJECT_DEFINE_PROPERTY`
An error occurred while setting an invalid attribute on the property of
an object.
<a id="ERR_INVALID_PACKAGE_CONFIG"></a>
### `ERR_INVALID_PACKAGE_CONFIG`