File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function create(string $migrationPayload) : Migrator
29
29
return App::make (AegisMigrator::class);
30
30
} elseif ($ this ->is2FASv2 ($ migrationPayload )) {
31
31
return App::make (TwoFASMigrator::class);
32
- } elseif ($ this -> isGoogleAuth ($ migrationPayload )) {
32
+ } elseif (self :: isGoogleAuth ($ migrationPayload )) {
33
33
return App::make (GoogleAuthMigrator::class);
34
34
} elseif ($ this ->isPlainText ($ migrationPayload )) {
35
35
return App::make (PlainTextMigrator::class);
@@ -43,7 +43,7 @@ public function create(string $migrationPayload) : Migrator
43
43
*
44
44
* @param string $migrationPayload The payload to analyse
45
45
*/
46
- private function isGoogleAuth (string $ migrationPayload ) : bool
46
+ public static function isGoogleAuth (string $ migrationPayload ) : bool
47
47
{
48
48
// - Google Auth migration URI : a string starting with otpauth-migration://offline?data= on a single line
49
49
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Services ;
4
4
5
+ use App \Factories \MigratorFactory ;
5
6
use chillerlan \QRCode \QRCode ;
6
7
use chillerlan \QRCode \QROptions ;
7
8
use Illuminate \Support \Facades \Log ;
@@ -68,7 +69,9 @@ public static function decode(\Illuminate\Http\UploadedFile $file)
68
69
}
69
70
}
70
71
71
- $ data = urldecode ($ text );
72
+ if (!MigratorFactory::isGoogleAuth ($ text )) {
73
+ $ data = urldecode ($ text );
74
+ }
72
75
73
76
Log::info ('QR code decoded ' );
74
77
You can’t perform that action at this time.
0 commit comments