Page MenuHomePhabricator

D13997.id33821.diff
No OneTemporary

D13997.id33821.diff

diff --git a/src/applications/differential/parser/__tests__/DifferentialCustomFieldRevertsParserTestCase.php b/src/applications/differential/parser/__tests__/DifferentialCustomFieldRevertsParserTestCase.php
--- a/src/applications/differential/parser/__tests__/DifferentialCustomFieldRevertsParserTestCase.php
+++ b/src/applications/differential/parser/__tests__/DifferentialCustomFieldRevertsParserTestCase.php
@@ -76,6 +76,9 @@
),
),
+ // This tests a degenerate regex behavior, see T9268.
+ 'Reverts aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz' => array(),
+
"This doesn't revert anything" => array(),
'nonrevert of r11' => array(),
'fixed a bug' => array(),
diff --git a/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php b/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php
--- a/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php
+++ b/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php
@@ -24,8 +24,8 @@
'(?:^|\b)'.
$prefix_regex.
$infix_regex.
- '((?:'.$monogram_pattern.'[,\s]*)+)'.
- '(?:\band\s+('.$monogram_pattern.'))?'.
+ '((?:'.$monogram_pattern.'(?:\b|$)[,\s]*)+)'.
+ '(?:\band\s+('.$monogram_pattern.'(?:\b|$)))?'.
$suffix_regex.
'(?:$|\b)'.
'/';

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 11:30 AM (11 h, 15 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6927865
Default Alt Text
D13997.id33821.diff (1 KB)

Event Timeline