mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-22 16:23:18 +01:00
Soften 2FAs migrations detection by ignoring schema version - Fixes #253
This commit is contained in:
parent
9d5d2705e4
commit
15c31c3341
@ -155,7 +155,7 @@ private function isAegisJSON(string $migrationPayload) : mixed
|
||||
*/
|
||||
private function is2FASv2(string $migrationPayload) : mixed
|
||||
{
|
||||
// - 2FAS JSON : is a JSON object with the key 'schemaVersion' == 2 and a key 'services' full of objects like
|
||||
// - 2FAS JSON : is a JSON object with a 'schemaVersion' key and a key 'services' full of objects like
|
||||
// {
|
||||
// "secret": "A4GRFTVVRBGY7UIW",
|
||||
// ...
|
||||
@ -178,7 +178,7 @@ private function is2FASv2(string $migrationPayload) : mixed
|
||||
|
||||
$json = json_decode($migrationPayload, true);
|
||||
|
||||
if (Arr::get($json, 'schemaVersion') == 2 && (Arr::has($json, 'services') || Arr::has($json, 'servicesEncrypted'))) {
|
||||
if (Arr::has($json, 'schemaVersion') && (Arr::has($json, 'services') || Arr::has($json, 'servicesEncrypted'))) {
|
||||
if (Arr::has($json, 'servicesEncrypted')) {
|
||||
throw new EncryptedMigrationException();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user