Skip to content

Commit 0a92721

Browse files
cjihrigBethGriggs
authored andcommittedSep 15, 2020
doc: deprecate process.umask() with no arguments
This commit introduces a documentation deprecation for calling process.umask() with no arguments. Backport-PR-URL: #34591 PR-URL: #32499 Fixes: #32321 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ec1df7b commit 0a92721

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
 

‎doc/api/deprecations.md

+18
Original file line numberDiff line numberDiff line change
@@ -2542,6 +2542,24 @@ accordingly instead to avoid the ambigiuty.
25422542
To maintain existing behaviour `response.finished` should be replaced with
25432543
`response.writableEnded`.
25442544

2545+
<a id="DEP0139"></a>
2546+
### DEP0139: `process.umask()` with no arguments
2547+
<!-- YAML
2548+
changes:
2549+
- version:
2550+
- v14.0.0
2551+
- REPLACEME
2552+
pr-url: https://github.com/nodejs/node/pull/32499
2553+
description: Documentation-only deprecation.
2554+
-->
2555+
2556+
Type: Documentation-only
2557+
2558+
Calling `process.umask()` with no arguments causes the process-wide umask to be
2559+
written twice. This introduces a race condition between threads, and is a
2560+
potential security vulnerability. There is no safe, cross-platform alternative
2561+
API.
2562+
25452563
[`--http-parser=legacy`]: cli.html#cli_http_parser_library
25462564
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
25472565
[`--throw-deprecation`]: cli.html#cli_throw_deprecation

‎doc/api/process.md

+10
Original file line numberDiff line numberDiff line change
@@ -2396,8 +2396,18 @@ flag's behavior.
23962396
## `process.umask([mask])`
23972397
<!-- YAML
23982398
added: v0.1.19
2399+
changes:
2400+
- version:
2401+
- v14.0.0
2402+
- REPLACEME
2403+
pr-url: https://github.com/nodejs/node/pull/32499
2404+
description: Calling `process.umask()` with no arguments is deprecated.
2405+
23992406
-->
24002407

2408+
> Stability: 0 - Deprecated. Calling `process.umask()` with no arguments is
2409+
> deprecated. No alternative is provided.
2410+
24012411
* `mask` {string|integer}
24022412

24032413
The `process.umask()` method sets or returns the Node.js process's file mode

0 commit comments

Comments
 (0)
Please sign in to comment.