Page MenuHomePhorge

D25835.1736838419.diff
No OneTemporary

D25835.1736838419.diff

diff --git a/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php b/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php
--- a/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php
+++ b/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php
@@ -73,6 +73,7 @@
foreach ($xactions as $xaction) {
$new = $xaction->getNewValue();
+ $xaction->setNewValue(trim($new)); // Strip surrounding whitespace
if (!strlen($new)) {
$errors[] = $this->newInvalidError(
pht('Tasks must have a title.'),
diff --git a/src/applications/project/xaction/PhabricatorProjectNameTransaction.php b/src/applications/project/xaction/PhabricatorProjectNameTransaction.php
--- a/src/applications/project/xaction/PhabricatorProjectNameTransaction.php
+++ b/src/applications/project/xaction/PhabricatorProjectNameTransaction.php
@@ -72,6 +72,7 @@
$max_length = $object->getColumnMaximumByteLength('name');
foreach ($xactions as $xaction) {
$new_value = $xaction->getNewValue();
+ $xaction->setNewValue(trim($new_value)); // Strip surrounding whitespace
$new_length = strlen($new_value);
if ($new_length > $max_length) {
$errors[] = $this->newInvalidError(

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 07:06 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1113953
Default Alt Text
D25835.1736838419.diff (1 KB)

Event Timeline