From 0183c8a2315312f80ed1098800573172576ad1cc Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 13 Oct 2014 00:18:01 -0400 Subject: [PATCH] TW-1420, TW-1421, TW-1422 - TW-1420 Modifying 'uuid' fails to generate error (thanks to Black Ops Testing). - TW-1421 Modifying 'uuid' with bogus value can corrupt undo.data (thanks to Black Ops Testing). - TW-1422 Attempt to modify 'id' attribute creates an id attribute (thanks to Black Ops Testing). --- AUTHORS | 1 + ChangeLog | 5 +++++ src/Task.cpp | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/AUTHORS b/AUTHORS index e65fb4c44..c1ac41eef 100644 --- a/AUTHORS +++ b/AUTHORS @@ -232,3 +232,4 @@ suggestions: Peter Vitt dev-zero Petteri + Black Ops Testing diff --git a/ChangeLog b/ChangeLog index 6e06e50af..d9aea62e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -159,6 +159,11 @@ - TW-1409 Allow "1 of N tasks remaining" to be correctly localized (thanks to Jeremy John Reeder). - TW-1415 The recurrence value 'month' is not valid (thanks to Petteri). +- TW-1420 Modifying 'uuid' fails to generate error (thanks to Black Ops Testing). +- TW-1421 Modifying 'uuid' with bogus value can corrupt undo.data (thanks to + Black Ops Testing). +- TW-1422 Attempt to modify 'id' attribute creates an id attribute (thanks to + Black Ops Testing). - TW-1428 Add support for color.uda.. rules. - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. diff --git a/src/Task.cpp b/src/Task.cpp index eb5365fc0..2d4ac1966 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1938,6 +1938,14 @@ void Task::modify (modType type, bool text_required /* = false */) } else { + // Some columns are not modifiable. + if (name == "uuid" || + name == "id" || + name == "mask" || + name == "imask" || + name == "parent") + throw format (STRING_INVALID_MOD, name, value); + // Get the column info. Column* column = context.columns[name];