Skip to content

Commit c21875b

Browse files
cjihrigaduh95
authored andcommitted
doc: deprecate process.umask() with no arguments
This commit introduces a documentation deprecation for calling process.umask() with no arguments. PR-URL: nodejs#32499 Fixes: nodejs#32321 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8f0a746 commit c21875b

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)