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 72ed09e

Browse filesBrowse files
committed
FIX
1 parent 70f5afd commit 72ed09e
Copy full SHA for 72ed09e

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Notifier/Bridge/Slack/SlackTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Slack/SlackTransport.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class SlackTransport extends AbstractTransport
3636

3737
public function __construct(string $accessToken, string $channel = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
3838
{
39-
if (!\in_array(substr($accessToken, 0, 6), ['xoxb-', 'xoxop-'], true) && 0 !== strpos($accessToken, 'xoxoa-3')) {
39+
if (!preg_match('/^xox(b-|p-|a-2)/', $accessToken)) {
4040
throw new InvalidArgumentException('A valid Slack token needs to start with "xoxb-", "xoxp-" or "xoxa-2". See https://api.slack.com/authentication/token-types for further information.');
4141
}
4242

0 commit comments

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