mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 06:53:01 +00:00
Make the parsing logic of the QR code URI more robust
This commit is contained in:
parent
cd42b0dc65
commit
2bf3546971
2 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ public class GoogleAuthInfo {
|
|||
default:
|
||||
throw new GoogleAuthInfoException(String.format("unsupported otp type: %s", type));
|
||||
}
|
||||
} catch (OtpInfoException e) {
|
||||
} catch (OtpInfoException | NumberFormatException e) {
|
||||
throw new GoogleAuthInfoException(e);
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class GoogleAuthInfo {
|
|||
if (digits != null) {
|
||||
info.setDigits(Integer.parseInt(digits));
|
||||
}
|
||||
} catch (OtpInfoException e) {
|
||||
} catch (OtpInfoException | NumberFormatException e) {
|
||||
throw new GoogleAuthInfoException(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue