Skip to content
Snippets Groups Projects
Commit 4b137bfc authored by Phil Höfer's avatar Phil Höfer Committed by Dominik Hebeler
Browse files

Apply 1 suggestion(s) to 1 file(s)

parent 4c9985e9
No related branches found
No related tags found
1 merge request!20Resolve "Only Allow Input of Valid Keys"
......@@ -129,7 +129,9 @@ router.post("/enter", upload.single("file"), async (req, res, next) => {
return;
}
}
if(input.match(/^[0-9A-F]{32}$/i)){
input = [input.slice(0,8), input.slice(8,12), input.slice(12,16), input.slice(16,20), input.slice(20,32)].join("-");
}
if(Key.IS_VALID_UUID(input) || input.match(/^[0-9a-zA-Z]{6}$/)){
key = await Key.GET_KEY(input).then((key) => key.get_key());
}else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment