Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2020-03-26 08:07:31 +0300
committercjihrig <cjihrig@gmail.com>2020-04-01 05:04:53 +0300
commit75ee5b2622956da74541bf3c6388cae5b5d766cf (patch)
tree26c58c7c47f200a2552537ece0e78d22cb1fc687 /doc/api
parent25a1f04cdc2c779c2b6d75e903e4bdc351cda856 (diff)
doc: deprecate process.umask() with no arguments
This commit introduces a documentation deprecation for calling process.umask() with no arguments. PR-URL: https://github.com/nodejs/node/pull/32499 Fixes: https://github.com/nodejs/node/issues/32321 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/deprecations.md16
-rw-r--r--doc/api/process.md8
2 files changed, 24 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index 7bce3bcff3a..bb3224a7360 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -2635,6 +2635,22 @@ modules is unsupported.
It is deprecated in favor of [`require.main`][], because it serves the same
purpose and is only available on CommonJS environment.
+<a id="DEP0XXX"></a>
+### DEP0XXX: `process.umask()` with no arguments
+<!-- YAML
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/32499
+ description: Documentation-only deprecation.
+-->
+
+Type: Documentation-only
+
+Calling `process.umask()` with no arguments causes the process-wide umask to be
+written twice. This introduces a race condition between threads, and is a
+potential security vulnerability. There is no safe, cross-platform alternative
+API.
+
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
diff --git a/doc/api/process.md b/doc/api/process.md
index 1c1089ca6b8..f15bfcc2be0 100644
--- a/doc/api/process.md
+++ b/doc/api/process.md
@@ -2426,8 +2426,16 @@ flag's behavior.
## `process.umask([mask])`
<!-- YAML
added: v0.1.19
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/32499
+ description: Calling `process.umask()` with no arguments is deprecated.
+
-->
+> Stability: 0 - Deprecated. Calling `process.umask()` with no arguments is
+> deprecated. No alternative is provided.
+
* `mask` {string|integer}
The `process.umask()` method sets or returns the Node.js process's file mode