Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4bf3d92

Browse filesBrowse files
author
Yukihiro Arisawa
committed
[Messenger] Only analyze the secret key.
1 parent 4e17e3f commit 4bf3d92
Copy full SHA for 4bf3d92

File tree

Expand file treeCollapse file tree

4 files changed

+15
-69
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+15
-69
lines changed

‎src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsQueryStringParserTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsQueryStringParserTest.php
-37Lines changed: 0 additions & 37 deletions
This file was deleted.

‎src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,16 @@ public function testFromDsnWithQueryOptions()
151151
);
152152
}
153153

154+
public function testFromDsnWithSecretKeyQueryOptions()
155+
{
156+
$httpClient = $this->createMock(HttpClientInterface::class);
157+
158+
$this->assertEquals(
159+
new Connection(['account' => '213', 'queue_name' => 'queue', 'buffer_size' => 1, 'wait_time' => 5, 'auto_setup' => false], new SqsClient(['region' => 'eu-west-1', 'accessKeyId' => null, 'accessKeySecret' => 'A+a+B+b'], null, $httpClient)),
160+
Connection::fromDsn('sqs://default/213/queue?secret_key=A+a+B+b&buffer_size=1&wait_time=5&auto_setup=0', [], $httpClient)
161+
);
162+
}
163+
154164
public function testFromDsnWithQueueNameOption()
155165
{
156166
$httpClient = $this->createMock(HttpClientInterface::class);

‎src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsQueryStringParser.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsQueryStringParser.php
-31Lines changed: 0 additions & 31 deletions
This file was deleted.

‎src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ public static function fromDsn(string $dsn, array $options = [], HttpClientInter
105105

106106
$query = [];
107107
if (isset($parsedUrl['query'])) {
108-
$query = (new AmazonSqsQueryStringParser())->parse($parsedUrl['query']);
108+
parse_str($parsedUrl['query'], $query);
109+
}
110+
111+
if (array_key_exists('secret_key', $query)) {
112+
$query['secret_key'] = str_replace(' ', '+', $query['secret_key']);
109113
}
110114

111115
// check for extra keys in options

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.