Skip to content
Snippets Groups Projects
Commit 2faa1ccc authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

only convert uuids to lower case

parent 1dbfc33a
No related branches found
No related tags found
No related merge requests found
Pipeline #10891 passed
......@@ -145,7 +145,6 @@ router.post("/enter", upload.single("file"), async (req, res, next) => {
} else if (input.match(/^Z\d+$/)) {
error = "invalid_key_payment_id";
} else {
input = input.toLowerCase();
if (input.match(/^[0-9A-F]{32}$/i)) {
input = [
input.slice(0, 8),
......@@ -155,6 +154,9 @@ router.post("/enter", upload.single("file"), async (req, res, next) => {
input.slice(20, 32),
].join("-");
}
if (Key.IS_VALID_UUID(input)) {
input = input.toLowerCase();
}
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