mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
deal with leading or missing @ and add more tests
This commit is contained in:
@@ -1267,7 +1267,12 @@ function parse_webbie($webbie) {
|
||||
$result['resource'] = urlencode($webbie);
|
||||
}
|
||||
elseif ($parsed['scheme'] === 'acct') {
|
||||
$parts = explode('@', $parsed['path']);
|
||||
$parts = explode('@', ltrim($parsed['path'], '@'));
|
||||
|
||||
if (count($parts) !== 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result['host'] = $parts[1];
|
||||
$result['resource'] = urlencode('acct:' . $parts[0] . '@' . $parts[1]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user