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 3902dc5

Browse filesBrowse files
committed
bug #20132 Use "more entropy" option for uniqid() (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20132). Discussion ---------- Use "more entropy" option for uniqid() | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As you can see in [the source code of the PHP uniqid() function](https://github.com/php/php-src/blob/1c295d4a9ac78fcc2f77d6695987598bb7abcb83/ext/standard/uniqid.c#L68) when you don't pass `true` as the second argument, PHP sleeps the application for 1 microsecond (`usleep(1)`) Symfony uses `true` almost everywhere, but there are still some places (mostly in bundles) where this is not the case. Commits ------- 4403e28 Use "more entropy" option for uniqid()
2 parents 80577f9 + 4403e28 commit 3902dc5
Copy full SHA for 3902dc5

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function getProxyCandidates()
8686
$definitions = array(
8787
array(new Definition(__CLASS__), true),
8888
array(new Definition('stdClass'), true),
89-
array(new Definition('foo'.uniqid()), false),
89+
array(new Definition(uniqid('foo', true)), false),
9090
array(new Definition(), false),
9191
);
9292

‎src/Symfony/Bridge/Twig/Command/LintCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Command/LintCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
109109
$template .= fread(STDIN, 1024);
110110
}
111111

112-
return $this->display($input, $output, array($this->validate($twig, $template, uniqid('sf_'))));
112+
return $this->display($input, $output, array($this->validate($twig, $template, uniqid('sf_', true))));
113113
}
114114

115115
$filesInfo = $this->getFilesInfo($twig, $filenames);

0 commit comments

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