diff --git a/pass/routes/key.js b/pass/routes/key.js index aefdf8434da36955bc658d850b7ae6f3391ed9bf..a29fd9eb0052aa2e41acff87e20ca33db1ae982a 100644 --- a/pass/routes/key.js +++ b/pass/routes/key.js @@ -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{