Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14426091
D13997.id33822.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13997.id33822.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 11:58 AM (11 h, 36 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6927865
Default Alt Text
D13997.id33822.diff (1 KB)
Attached To
Mode
D13997: Prevent "commit message magic words" parser from exploding on "reverts aaaa.....aaz"
Attached
Detach File
Event Timeline
Log In to Comment