Page MenuHomePhorge

D25635.1734729143.diff
No OneTemporary

D25635.1734729143.diff

diff --git a/src/infrastructure/editor/PhabricatorEditorURIEngine.php b/src/infrastructure/editor/PhabricatorEditorURIEngine.php
--- a/src/infrastructure/editor/PhabricatorEditorURIEngine.php
+++ b/src/infrastructure/editor/PhabricatorEditorURIEngine.php
@@ -279,10 +279,11 @@
// editor links do surprising things with paths containing "/../".
// Find anything that looks like "/../" and mangle it.
-
- $token = preg_replace('((^|/)\.\.(/|\z))', '\1dot-dot\2', $token);
-
- return phutil_escape_uri($token);
+ if (phutil_nonempty_string($token)) {
+ $token = preg_replace('((^|/)\.\.(/|\z))', '\1dot-dot\2', $token);
+ return phutil_escape_uri($token);
+ }
+ return '';
}
private function newStringFromTokens(array $tokens) {

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 21:12 (16 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021065
Default Alt Text
D25635.1734729143.diff (772 B)

Event Timeline