Skip to content

Commit ec7943b

Browse files
Merge branch '6.1' into 6.2
* 6.1: [HttpClient] Fix computing retry delay when using RetryableHttpClient [Uid] Fix validating UUID variant bits [Validator][UID] Stop to first ULID format violation [Bridge] Fix mkdir() race condition in ProxyCacheWarmer [Cache] update readme Bug #42343 [Security] Fix valid remember-me token exposure to the second consequent request Prevent exception if request stack is empty Psr18Client ignore invalid HTTP headers skip a transient test on AppVeyor
2 parents 598026b + 6cba9ad commit ec7943b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Constraints/UlidValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ public function validate(mixed $value, Constraint $constraint)
4545
->setParameter('{{ value }}', $this->formatValue($value))
4646
->setCode(26 > \strlen($value) ? Ulid::TOO_SHORT_ERROR : Ulid::TOO_LONG_ERROR)
4747
->addViolation();
48+
49+
return;
4850
}
4951

5052
if (\strlen($value) !== strspn($value, '0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz')) {
5153
$this->context->buildViolation($constraint->message)
5254
->setParameter('{{ value }}', $this->formatValue($value))
5355
->setCode(Ulid::INVALID_CHARACTERS_ERROR)
5456
->addViolation();
57+
58+
return;
5559
}
5660

5761
// Largest valid ULID is '7ZZZZZZZZZZZZZZZZZZZZZZZZZ'

Tests/Constraints/UlidValidatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function getInvalidUlids()
7878
['01ARZ3NDEKTSV4RRFFQ69G5FAVA', Ulid::TOO_LONG_ERROR],
7979
['01ARZ3NDEKTSV4RRFFQ69G5FAO', Ulid::INVALID_CHARACTERS_ERROR],
8080
['Z1ARZ3NDEKTSV4RRFFQ69G5FAV', Ulid::TOO_LARGE_ERROR],
81+
['not-even-ulid-like', Ulid::TOO_SHORT_ERROR],
8182
];
8283
}
8384

0 commit comments

Comments
 (0)