Task: Modified the way UUIDs are validated
This commit is contained in:
@@ -1427,10 +1427,9 @@ void Task::validate (bool applyDefault /* = true */)
|
|||||||
if (has ("uuid") && uid != "")
|
if (has ("uuid") && uid != "")
|
||||||
{
|
{
|
||||||
Lexer lex (uid);
|
Lexer lex (uid);
|
||||||
|
std::string token;
|
||||||
Lexer::Type type;
|
Lexer::Type type;
|
||||||
if (! lex.token (uid, type) ||
|
if (! lex.isUUID (token, type, false))
|
||||||
uid.length () != 36 ||
|
|
||||||
type != Lexer::Type::uuid)
|
|
||||||
throw format (STRING_CMD_IMPORT_UUID_BAD, uid);
|
throw format (STRING_CMD_IMPORT_UUID_BAD, uid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user