1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

Merge pull request #2823 from appwrite/feat-improve-code-readability

Improved Token passing
This commit is contained in:
Eldad A. Fux 2022-02-23 13:30:19 +02:00 committed by GitHub
commit 188d92dd99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -529,11 +529,8 @@ App::get('/.well-known/acme-challenge')
throw new Exception('Invalid challenge token.', 400);
}
$filePath = '/.well-known/acme-challenge' . $token;
$base = \realpath(APP_STORAGE_CERTIFICATES);
$path = \str_replace('/.well-known/acme-challenge/', '', $filePath);
$absolute = \realpath($base.'/.well-known/acme-challenge/'.$path);
$absolute = \realpath($base.'/.well-known/acme-challenge/'.$token);
if (!$base) {
throw new Exception('Storage error', 500);