Update regex to detect external links with attachments

Fixes #4359
This commit is contained in:
Slade
2020-02-05 19:46:13 -07:00
committed by GitHub
parent 528dc633aa
commit 0360c57c79
2 changed files with 10 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ class AttachmentLinkProvider extends BaseLinkProvider implements ExternalLinkPro
*/
public function match()
{
if (preg_match('/^https?:\/\/.*\.([^\/]+)$/', $this->userInput, $matches)) {
if (preg_match('/^https?:\/\/.*\/.*\.([^\/]+)$/', $this->userInput, $matches)) {
return $this->isValidExtension($matches[1]);
}