Merge pull request #11080 from annando/simplify-zrl

ZRL: Simplify the code structure
This commit is contained in:
Hypolite Petovan 2021-12-08 17:19:38 -05:00 committed by GitHub
commit 2fd3a47fba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -600,8 +600,7 @@ class App
} }
// ZRL // ZRL
if (!empty($_GET['zrl']) && $this->mode->isNormal() && !$this->mode->isBackend()) { if (!empty($_GET['zrl']) && $this->mode->isNormal() && !$this->mode->isBackend() && !local_user()) {
if (!local_user()) {
// Only continue when the given profile link seems valid // Only continue when the given profile link seems valid
// Valid profile links contain a path with "/profile/" and no query parameters // Valid profile links contain a path with "/profile/" and no query parameters
if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == "") && if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == "") &&
@ -624,7 +623,6 @@ class App
throw new HTTPException\ForbiddenException(); throw new HTTPException\ForbiddenException();
} }
} }
}
if (!empty($_GET['owt']) && $this->mode->isNormal()) { if (!empty($_GET['owt']) && $this->mode->isNormal()) {
$token = $_GET['owt']; $token = $_GET['owt'];