Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13967227
D11914.id28702.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
D11914.id28702.diff
View Options
diff --git a/src/applications/console/controller/DarkConsoleDataController.php b/src/applications/console/controller/DarkConsoleDataController.php
--- a/src/applications/console/controller/DarkConsoleDataController.php
+++ b/src/applications/console/controller/DarkConsoleDataController.php
@@ -61,7 +61,7 @@
// Because cookie names can now be prefixed, wipe out any cookie value
// with the session cookie name anywhere in its name.
- $pattern = '('.preg_quote(PhabricatorCookies::COOKIE_SESSION).')';
+ $pattern = '#'.preg_quote(PhabricatorCookies::COOKIE_SESSION, '#').'#';
foreach ($_COOKIE as $cookie_name => $cookie_value) {
if (preg_match($pattern, $cookie_name)) {
$panel = PhutilSafeHTML::applyFunction(
diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
@@ -163,15 +163,15 @@
private function getObjectEmbedPattern() {
$prefix = $this->getObjectNamePrefix();
- $prefix = preg_quote($prefix);
+ $prefix = preg_quote($prefix, '#');
$id = $this->getObjectIDPattern();
- return '(\B{'.$prefix.'('.$id.')([,\s](?:[^}\\\\]|\\\\.)*)?}\B)u';
+ return '#\B{'.$prefix.'('.$id.')([,\s](?:[^}\\\\]|\\\\.)*)?}\B#u';
}
private function getObjectReferencePattern() {
$prefix = $this->getObjectNamePrefix();
- $prefix = preg_quote($prefix);
+ $prefix = preg_quote($prefix, '#');
$id = $this->getObjectIDPattern();
@@ -192,7 +192,7 @@
// The "\b" allows us to link "(abcdef)" or similar without linking things
// in the middle of words.
- return '((?<![#-])'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?(?!\w))u';
+ return '#(?<![#-])'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?(?!\w)#u';
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 17, 12:23 PM (3 w, 21 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722053
Default Alt Text
D11914.id28702.diff (1 KB)
Attached To
Mode
D11914: Minor change to suppress linter warning
Attached
Detach File
Event Timeline
Log In to Comment