8000 [Mailer] [Azure] Fix resource name validation · symfony/symfony@088faf5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 088faf5

Browse files
t9toqwertyOskarStark
authored andcommitted
[Mailer] [Azure] Fix resource name validation
1 parent 7269a3d commit 088faf5

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