fix: support v6 and v7 uuids

pull/221/head
Frank Marazita 2024-07-30 14:27:08 +10:00
rodzic de3ea73400
commit cf7754cd31
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -99,7 +99,7 @@ module.exports = {
const userUuid = req.get('set-uuid');
// Valid UUID and no other task with same UUID?
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(userUuid) && !TaskManager.singleton().find(userUuid)){
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(userUuid) && !TaskManager.singleton().find(userUuid)){
req.id = userUuid;
next();
}else{