1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-16 13:55:52 +02:00

check that period is positive value

This commit is contained in:
Kyle Spearrin 2018-07-31 11:35:04 -04:00
parent 41ab22a82f
commit ee13a562f9

View File

@ -30,7 +30,10 @@ export class TotpService implements TotpServiceAbstraction {
}
if (params.has('period') && params.get('period') != null) {
try {
period = parseInt(params.get('period').trim(), null);
const periodParam = parseInt(params.get('period').trim(), null);
if (periodParam > 0) {
period = periodParam;
}
} catch { }
}
if (params.has('secret') && params.get('secret') != null) {