File tree Expand file tree Collapse file tree 5 files changed +2
-31
lines changed Expand file tree Collapse file tree 5 files changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -2531,10 +2531,10 @@ purpose and is only available on CommonJS environment.
2531
2531
changes:
2532
2532
- version: v14.0.0
2533
2533
pr-url: https://github.com/nodejs/node/pull/32499
2534
- description: Runtime deprecation.
2534
+ description: Documentation-only deprecation.
2535
2535
-->
2536
2536
2537
- Type: Runtime
2537
+ Type: Documentation-only
2538
2538
2539
2539
Calling ` process.umask() ` with no argument causes the process-wide umask to be
2540
2540
written twice. This introduces a race condition between threads, and is a
Original file line number Diff line number Diff line change @@ -808,14 +808,6 @@ void Environment::set_filehandle_close_warning(bool on) {
808
808
emit_filehandle_warning_ = on;
809
809
}
810
810
811
- bool Environment::emit_insecure_umask_warning () const {
812
- return emit_insecure_umask_warning_;
813
- }
814
-
815
- void Environment::set_emit_insecure_umask_warning (bool on) {
816
- emit_insecure_umask_warning_ = on;
817
- }
818
-
819
811
void Environment::set_source_maps_enabled (bool on) {
820
812
source_maps_enabled_ = on;
821
813
}
Original file line number Diff line number Diff line change @@ -1160,8 +1160,6 @@ class Environment : public MemoryRetainer {
1160
1160
1161
1161
inline bool filehandle_close_warning () const ;
1162
1162
inline void set_filehandle_close_warning (bool on);
1163
- inline bool emit_insecure_umask_warning () const ;
1164
- inline void set_emit_insecure_umask_warning (bool on);
1165
1163
1166
1164
inline void set_source_maps_enabled (bool on);
1167
1165
inline bool source_maps_enabled () const ;
@@ -1386,7 +1384,6 @@ class Environment : public MemoryRetainer {
1386
1384
bool emit_env_nonstring_warning_ = true ;
1387
1385
bool emit_err_name_warning_ = true ;
1388
1386
bool emit_filehandle_warning_ = true ;
1389
- bool emit_insecure_umask_warning_ = true ;
1390
1387
bool source_maps_enabled_ = false ;
1391
1388
1392
1389
size_t async_callback_scope_depth_ = 0 ;
Original file line number Diff line number Diff line change @@ -206,17 +206,6 @@ static void Umask(const FunctionCallbackInfo<Value>& args) {
206
206
207
207
uint32_t old;
208
208
if (args[0 ]->IsUndefined ()) {
209
- if (env->emit_insecure_umask_warning ()) {
210
- env->set_emit_insecure_umask_warning (false );
211
- if (ProcessEmitDeprecationWarning (
212
- env,
213
- " Calling process.umask() with no arguments is prone to race "
214
- " conditions and is a potential security vulnerability." ,
215
- " DEP0139" ).IsNothing ()) {
216
- return ;
217
- }
218
- }
219
-
220
209
old = umask (0 );
221
210
umask (static_cast <mode_t >(old));
222
211
} else {
Original file line number Diff line number Diff line change @@ -40,13 +40,6 @@ if (common.isWindows) {
40
40
mask = '0664' ;
41
41
}
42
42
43
- common . expectWarning (
44
- 'DeprecationWarning' ,
45
- 'Calling process.umask() with no arguments is prone to race conditions ' +
46
- 'and is a potential security vulnerability.' ,
47
- 'DEP0139'
48
- ) ;
49
-
50
43
const old = process . umask ( mask ) ;
51
44
52
45
assert . strictEqual ( process . umask ( old ) , parseInt ( mask , 8 ) ) ;
You can’t perform that action at this time.
0 commit comments