Skip to content

Commit b3f34b0

Browse files
bug #47529 [Routing] Reject v2 UUIDs (nicolas-grekas)
This PR was merged into the 6.1 branch. Discussion ---------- [Routing] Reject v2 UUIDs | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - We don't support them, they're legacy. Commits ------- 33a1479 [Routing] Reject v2 UUIDs
2 parents 54a1653 + 33a1479 commit b3f34b0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/Routing/Requirement/Requirement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ enum Requirement
2424
public const UID_BASE58 = '[1-9A-HJ-NP-Za-km-z]{22}';
2525
public const UID_RFC4122 = '[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}';
2626
public const ULID = '[0-7][0-9A-HJKMNP-TV-Z]{25}';
27-
public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[1-6][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
27+
public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[13-6][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
2828
public const UUID_V1 = '[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
2929
public const UUID_V3 = '[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
3030
public const UUID_V4 = '[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';

src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ public function testUuidOK(string $uuid)
272272
* ["e55a29be-ba25-46e0-a5e5-85b78a6f9a1"]
273273
* ["e55a29bh-ba25-46e0-a5e5-85b78a6f9a11"]
274274
* ["e55a29beba2546e0a5e585b78a6f9a11"]
275+
* ["21902510-bc96-21ec-8422-0242ac120002"]
275276
*/
276277
public function testUuidKO(string $uuid)
277278
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy