diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-08-27 17:49:01 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-08-27 17:49:01 +0300 |
commit | c0a0d40e6298be28376e59dde4ed86c63c308cdb (patch) | |
tree | c6d2ca4c514f22e549f192e694a4200aca0407a3 /controller | |
parent | f62d3d6545550efcfdec1a16bc38ea11c721e5f8 (diff) |
Do not show actual error message
In case of not existant files this could leak informations such as the full path.
Diffstat (limited to 'controller')
-rw-r--r-- | controller/filehandlingcontroller.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/controller/filehandlingcontroller.php b/controller/filehandlingcontroller.php index efb2283..8583e74 100644 --- a/controller/filehandlingcontroller.php +++ b/controller/filehandlingcontroller.php @@ -103,8 +103,7 @@ class FileHandlingController extends Controller{ } } catch (\Exception $e) { - $hint = method_exists($e, 'getHint') ? $e->getHint() : $e->getMessage(); - return new DataResponse(['message' => (string)$hint], Http::STATUS_BAD_REQUEST); + return new DataResponse(['message' => 'An internal server error occurred.'], Http::STATUS_BAD_REQUEST); } } |