Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3424797
D25955.1744646499.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
898 B
Referenced Files
None
Subscribers
None
D25955.1744646499.diff
View Options
diff --git a/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php b/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php
--- a/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php
+++ b/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php
@@ -42,7 +42,13 @@
}
$class = get_class($throwable);
- $message = $throwable->getMessage();
+
+ // Include last location in error message: Get absolute Phorge path, strip
+ // its /webroot, and remove it as path prefix not to expose server details
+ $root_dir_len = strlen(substr(realpath($_SERVER['DOCUMENT_ROOT']), 0, -8));
+ $filename = substr($throwable->getFile(), $root_dir_len);
+ $message = $throwable->getMessage().' at ['.$filename.':'.
+ $throwable->getLine().']';
if ($throwable instanceof AphrontSchemaQueryException) {
$message .= "\n\n".pht(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 14, 16:01 (1 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1279790
Default Alt Text
D25955.1744646499.diff (898 B)
Attached To
Mode
D25955: Unhandled Exception: Add last call to error message
Attached
Detach File
Event Timeline
Log In to Comment