Skip to content

Commit

Permalink
doc: deprecate process.umask() with no arguments
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cjihrig authored and MylesBorins committed Aug 18, 2020
1 parent 11a87ed commit b7fb94d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2542,6 +2542,24 @@ accordingly instead to avoid the ambigiuty.
To maintain existing behaviour `response.finished` should be replaced with
`response.writableEnded`.

<a id="DEP0139"></a>
### DEP0139: `process.umask()` with no arguments
<!-- YAML
changes:
- version:
- v14.0.0
- 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.

[`--http-parser=legacy`]: cli.html#cli_http_parser_library
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
Expand Down
10 changes: 10 additions & 0 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2396,8 +2396,18 @@ flag's behavior.
## `process.umask([mask])`
<!-- YAML
added: v0.1.19
changes:
- version:
- v14.0.0
- 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
Expand Down

0 comments on commit b7fb94d

Please sign in to comment.