Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ca7dee

Browse filesBrowse files
committed
Fix mode
1 parent a17aa5e commit 5ca7dee
Copy full SHA for 5ca7dee

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/Filesystem/Filesystem.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ public function tempnam($dir, $prefix)
487487
$tmpFile = $dir.'/'.$prefix.uniqid(mt_rand(), true);
488488

489489
// Use fopen instead of file_exists as some streams do not support stat
490-
// Use mode 'x' to atomically check existence and create to avoid a TOCTOU vulnerability
491-
$handle = @fopen($tmpFile, 'x');
490+
// Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability
491+
$handle = @fopen($tmpFile, 'x+');
492492

493493
// If unsuccessful restart the loop
494494
if (false === $handle) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.