Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6abb8119 authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Merge branch 'update-check-app-creds' into 'main'

Use hash_equals

See merge request !36
parents 285152c3 3909199b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,6 +136,6 @@ class UserController extends ApiController {

	private function checkAppCredentials(string $token): bool {
		$ecloud_accounts_secret = $this->userService->getConfigValue('secret');
		return strcmp($token, $ecloud_accounts_secret) === 0;
		return hash_equals($ecloud_accounts_secret, $token);
	}
}