diff options
author | Julius Haertl <jus@bitgrid.net> | 2016-11-04 18:55:00 +0100 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2016-11-18 10:23:25 +0100 |
commit | 78de213b8582f160b9e3acd1d921a6dd1ccd88d9 (patch) | |
tree | ef7374ebd57633a9e6f7af8f8880d0134bbae890 /apps/theming/lib/Controller | |
parent | 3a400f92d1936b2b752d813cbb27632d6acb9904 (diff) | |
download | nextcloud-server-78de213b8582f160b9e3acd1d921a6dd1ccd88d9.tar.gz nextcloud-server-78de213b8582f160b9e3acd1d921a6dd1ccd88d9.zip |
Sanitize input and small fixes
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/lib/Controller')
-rw-r--r-- | apps/theming/lib/Controller/IconController.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php index 08d5b50120f..519c52f5fa9 100644 --- a/apps/theming/lib/Controller/IconController.php +++ b/apps/theming/lib/Controller/IconController.php @@ -27,6 +27,7 @@ use OCA\Theming\ImageManager; use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\DataDisplayResponse; use OCP\AppFramework\Http\FileDisplayResponse; use OCP\AppFramework\Utility\ITimeFactory; @@ -131,7 +132,8 @@ class IconController extends Controller { $response->addHeader('Expires', $expires->format(\DateTime::RFC2822)); $response->addHeader('Pragma', 'cache'); } else { - $response = new DataDisplayResponse(null, Http::STATUS_NOT_FOUND); + $response = new Response(); + $response->setStatus(Http::STATUS_NOT_FOUND); $response->cacheFor(0); $response->setLastModified(new \DateTime('now', new \DateTimeZone('GMT'))); } @@ -163,7 +165,8 @@ class IconController extends Controller { $response->addHeader('Expires', $expires->format(\DateTime::RFC2822)); $response->addHeader('Pragma', 'cache'); } else { - $response = new DataDisplayResponse(null, Http::STATUS_NOT_FOUND); + $response = new Response(); + $response->setStatus(Http::STATUS_NOT_FOUND); $response->cacheFor(0); $response->setLastModified(new \DateTime('now', new \DateTimeZone('GMT'))); } |