mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 07:45:00 -04:00
Fixed compilation error
This commit is contained in:
parent
0a73825ebe
commit
b713be5a9e
1 changed files with 4 additions and 7 deletions
|
@ -49,18 +49,15 @@ class JWTVerify extends Operation {
|
|||
*/
|
||||
run(input, args) {
|
||||
const [key, alg] = args;
|
||||
let algos = [];
|
||||
switch (alg) {
|
||||
case "Any":
|
||||
const algos = JWT_ALGORITHMS;
|
||||
algos = JWT_ALGORITHMS;
|
||||
break;
|
||||
case "None":
|
||||
const algos = [ "none" ];
|
||||
algos.push("none");
|
||||
default:
|
||||
const algIndex = JWT_ALGORITHMS.indexOf(alg);
|
||||
if (algIndex === -1) {
|
||||
throw new OperationError("The JWT verification algorithm provided is not supported.");
|
||||
}
|
||||
const algos = JWT_ALGORITHMS[];
|
||||
algos.push(alg);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue