Page MenuHomePhorge

D25635.1729282629.diff
No OneTemporary

D25635.1729282629.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, Oct 18, 20:17 (13 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
931938
Default Alt Text
D25635.1729282629.diff (772 B)

Event Timeline