mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-22 02:03:08 +02:00
Task: Modified the way UUIDs are validated
This commit is contained in:
parent
b4077775c2
commit
6b69903208
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue