Remove html encoding for urls

This commit is contained in:
Matej Bačo
2026-02-23 12:45:18 +01:00
parent e2bc3afce6
commit 2b6b66d8a4
2 changed files with 0 additions and 41 deletions
-29
View File
@@ -2112,15 +2112,6 @@ Http::post('/v1/account/tokens/magic-url')
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
}
$url = \parse_url($url);
$url['path'] = \htmlentities($url['path'] ?? '');
$url = (isset($url['scheme']) ? $url['scheme'] . '://' : '') .
(isset($url['user']) ? $url['user'] . (isset($url['pass']) ? ':' . $url['pass'] : '') . '@' : '') .
(isset($url['host']) ? $url['host'] : '') .
(isset($url['port']) ? ':' . $url['port'] : '') .
(isset($url['path']) ? $url['path'] : '') .
(isset($url['query']) ? '?' . $url['query'] : '') .
(isset($url['fragment']) ? '#' . $url['fragment'] : '');
if ($phrase === true) {
$phrase = Phrase::generate();
@@ -3582,16 +3573,6 @@ Http::post('/v1/account/recovery')
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
}
$url = \parse_url($url);
$url['path'] = \htmlentities($url['path'] ?? '');
$url = (isset($url['scheme']) ? $url['scheme'] . '://' : '') .
(isset($url['user']) ? $url['user'] . (isset($url['pass']) ? ':' . $url['pass'] : '') . '@' : '') .
(isset($url['host']) ? $url['host'] : '') .
(isset($url['port']) ? ':' . $url['port'] : '') .
(isset($url['path']) ? $url['path'] : '') .
(isset($url['query']) ? '?' . $url['query'] : '') .
(isset($url['fragment']) ? '#' . $url['fragment'] : '');
$email = \strtolower($email);
$profile = $dbForProject->findOne('users', [
@@ -3907,16 +3888,6 @@ Http::post('/v1/account/verifications/email')
throw new Exception(Exception::USER_EMAIL_NOT_FOUND);
}
$url = \parse_url($url);
$url['path'] = \htmlentities($url['path'] ?? '');
$url = (isset($url['scheme']) ? $url['scheme'] . '://' : '') .
(isset($url['user']) ? $url['user'] . (isset($url['pass']) ? ':' . $url['pass'] : '') . '@' : '') .
(isset($url['host']) ? $url['host'] : '') .
(isset($url['port']) ? ':' . $url['port'] : '') .
(isset($url['path']) ? $url['path'] : '') .
(isset($url['query']) ? '?' . $url['query'] : '') .
(isset($url['fragment']) ? '#' . $url['fragment'] : '');
if ($user->getAttribute('emailVerification')) {
throw new Exception(Exception::USER_EMAIL_ALREADY_VERIFIED);
}
-12
View File
@@ -498,18 +498,6 @@ Http::post('/v1/teams/:teamId/memberships')
$isAppUser = User::isApp($authorization->getRoles());
$isPrivilegedUser = User::isPrivileged($authorization->getRoles());
if (!empty($url)) {
$url = \parse_url($url);
$url['path'] = \htmlentities($url['path'] ?? '');
$url = (isset($url['scheme']) ? $url['scheme'] . '://' : '') .
(isset($url['user']) ? $url['user'] . (isset($url['pass']) ? ':' . $url['pass'] : '') . '@' : '') .
(isset($url['host']) ? $url['host'] : '') .
(isset($url['port']) ? ':' . $url['port'] : '') .
(isset($url['path']) ? $url['path'] : '') .
(isset($url['query']) ? '?' . $url['query'] : '') .
(isset($url['fragment']) ? '#' . $url['fragment'] : '');
}
if (empty($url)) {
if (!$isAppUser && !$isPrivilegedUser) {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'URL is required');