forked from dedis/d-voting
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix SCIPER verification and add it to adding policy functions
- Loading branch information
1 parent
ca99a06
commit 015e8e2
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,9 @@ export function setMapAuthorization(list: string[][]): Map<String, Array<String> | |
// the range between 100000 and 999999, an error is thrown. | ||
export function readSCIPER(s: string): number { | ||
const n = parseInt(s, 10); | ||
if (isNaN(n)) { | ||
Check failure on line 102 in web/backend/src/authManager.ts GitHub Actions / Web backend Lint
|
||
throw new Error(`${s} is not a number`); | ||
} | ||
if (n < 100000 || n > 999999) { | ||
throw new Error(`SCIPER is out of range. ${n} is not between 100000 and 999999`); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters