diff --git a/src/applications/files/conduit/FileConduitAPIMethod.php b/src/applications/files/conduit/FileConduitAPIMethod.php --- a/src/applications/files/conduit/FileConduitAPIMethod.php +++ b/src/applications/files/conduit/FileConduitAPIMethod.php @@ -81,6 +81,9 @@ } protected function decodeBase64($data) { + if (!phutil_nonempty_string($data)) { + throw new Exception(pht('Empty base64 data!')); + } $data = base64_decode($data, $strict = true); if ($data === false) { throw new Exception(pht('Unable to decode base64 data!'));