Fixes #1 and #2
Improve validation on period and digits #12
Merged
rtn
merged 2 commits from 2025年01月20日 11:16:42 +01:00
better-validation into main
rtn
commented 2025年01月20日 10:59:53 +01:00
rtn
force-pushed better-validation from 2025年01月20日 11:03:40 +01:00
Compare
0f01ef58f7
to 2022f0d2ae
rtn
reviewed 2025年01月20日 11:06:33 +01:00
app.js
Outdated
@ -294,2 +308,2 @@
account.period = Number(params.get('period'))
if (isNaN(account.period) || account.period <= 0) {
const period = account.period = Number(params.get('period'))
if (!isWholeNumber(period) || !inRange(period, 20, 120)) {
rtn
commented 2025年01月20日 11:06:33 +01:00
I picked an interval of 20s to 120s for the refresh time. I more or less picked them out of a hat. The default time period is 30s and it doesn't make sense to have it too short, nor too large. If it's too short, then you don't have time to use it before there's a new one generated. And if it's too large then it defeats the purpose altogether (approaching a static password as time increases).
I picked an interval of 20s to 120s for the refresh time. I more or less picked them out of a hat. The default time period is 30s and it doesn't make sense to have it too short, nor too large. If it's too short, then you don't have time to use it before there's a new one generated. And if it's too large then it defeats the purpose altogether (approaching a static password as time increases).
rtn
added 1 commit 2025年01月20日 11:11:35 +01:00
rtn
merged commit d5d8550bae into main 2025年01月20日 11:16:42 +01:00
rtn
deleted branch better-validation 2025年01月20日 11:16:49 +01:00
rtn
referenced this pull request from a commit 2025年01月20日 11:16:52 +01:00
Sign in to join this conversation.
No reviewers
No labels
bug
docs
enhancement
feature
help wanted
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
rtn/totp!12
Loading...
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "better-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?