merged branch 1ed/token-length (PR #7665)

This PR was merged into the 2.1 branch.

Discussion
----------

[WebProfilerBundle] made token shorter in WDT

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The length of the profiler token was increased by [this](b9cdb9a26d
) commit. This PR makes the visible token shorter.

Before:
![before](https://f.cloud.github.com/assets/162986/376901/338b9684-a461-11e2-9806-fc77d5ce5039.png)
After:
![after](https://f.cloud.github.com/assets/162986/376902/338ee078-a461-11e2-88c8-78748739565c.png)

Commits
-------

1adbe3c [HttpKernel] truncate profiler token to 6 chars (see #7665)
This commit is contained in:
Fabien Potencier 2013-04-14 20:15:16 +02:00
commit 324686cf25
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class Profiler
return;
}
$profile = new Profile(sha1(uniqid(mt_rand(), true)));
$profile = new Profile(substr(sha1(uniqid(mt_rand(), true)), 0, 6));
$profile->setTime(time());
$profile->setUrl($request->getUri());
$profile->setIp($request->getClientIp());