8000 bug #53388 [Mailer] [Azure] Fix resource name validation (t9toqwerty) · symfony/symfony@d621936 · GitHub
[go: up one dir, main page]

Skip to content

Commit d621936

Browse files
committed
bug #53388 [Mailer] [Azure] Fix resource name validation (t9toqwerty)
This PR was squashed before being merged into the 7.1 branch. Discussion ---------- [Mailer] [Azure] Fix resource name validation | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #53385 | License | MIT Remove validation where Azure Email Communication Resource with dot in name is not being allowed to use. Commits ------- 088faf5 [Mailer] [Azure] Fix resource name validation
2 parents 745da80 + 088faf5 commit d621936

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureApiTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testTagAndMetadataHeaders()
121121
public function testItDoesNotAllowToAddResourceNameWithDot()
122122
{
123123
$this->expectException(\Exception::class);
124-
$this->expectExceptionMessage('Resource name cannot contain or end with a dot');
124+
$this->expectExceptionMessage('Resource name must not end with a dot "."');
125125

126126
new AzureApiTransport('KEY', 'ACS_RESOURCE_NAME.');
127127
}

src/Symfony/Component/Mailer/Bridge/Azure/Transport/AzureApiTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public function __construct(
4343
?EventDispatcherInterface $dispatcher = null,
4444
?LoggerInterface $logger = null,
4545
) {
46-
if (str_contains($resourceName, '.') || str_ends_with($resourceName, '.')) {
47-
throw new \Exception('Resource name cannot contain or end with a dot.');
46+
if (str_ends_with($resourceName, '.')) {
47+
throw new \Exception('Resource name must not end with a dot ".".');
4848
}
4949

5050
parent::__construct($client, $dispatcher, $logger);

0 commit comments

Comments
 (0)
0