mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
check that period is positive value
This commit is contained in:
parent
41ab22a82f
commit
ee13a562f9
@ -30,7 +30,10 @@ export class TotpService implements TotpServiceAbstraction {
|
|||||||
}
|
}
|
||||||
if (params.has('period') && params.get('period') != null) {
|
if (params.has('period') && params.get('period') != null) {
|
||||||
try {
|
try {
|
||||||
period = parseInt(params.get('period').trim(), null);
|
const periodParam = parseInt(params.get('period').trim(), null);
|
||||||
|
if (periodParam > 0) {
|
||||||
|
period = periodParam;
|
||||||
|
}
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
if (params.has('secret') && params.get('secret') != null) {
|
if (params.has('secret') && params.get('secret') != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user