Merge pull request #7329 from annando/issue-4815

Issue 4815: Silently ignoring trailing @ at follow requests
This commit is contained in:
Hypolite Petovan 2019-06-29 16:56:49 -04:00 committed by GitHub
commit 4bb7a8c342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,9 @@ function follow_content(App $a)
} }
$uid = local_user(); $uid = local_user();
$url = Strings::escapeTags(trim(defaults($_REQUEST, 'url', '')));
// Issue 4815: Silently removing a prefixing @
$url = ltrim(Strings::escapeTags(trim(defaults($_REQUEST, 'url', ''))), '@!');
// Issue 6874: Allow remote following from Peertube // Issue 6874: Allow remote following from Peertube
if (strpos($url, 'acct:') === 0) { if (strpos($url, 'acct:') === 0) {