]> source.dussan.org Git - nextcloud-server.git/commit
Always try and show pre rendered preview
authorScott Dutton <scott@exussum.co.uk>
Sun, 12 Apr 2020 15:38:59 +0000 (16:38 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 13 Aug 2020 20:50:38 +0000 (22:50 +0200)
commitb12a390220a0a38ec18557b52c2eec7cf25dfc49
tree1e4471e468b50497737dcb97c2bb64f39786d015
parente9f5c7f649b923ec45d7a37eb24369e11727ccbf
Always try and show pre rendered preview

Currently if the following situation happens

Server generates preview
Server has command removed which allows a preview to be shown
Client asks for preview, gets a 404 error when preview exists
(Mime checked before preview)

This happens more often with documents, or video as the commands are not
native PHP, they require a binary on the server.

After the fix the following would happen

Server generates preview
Server has command removed which allows a preview to be shown
Client asks for preview, gets preview which has been generated
(Mime checked after preview)

This would also allow offline generation (for example a docker image
containing the extra binaries), allowing a reduction in attack surface
of the instance serving the preview data.

Signed-off-by: Scott Dutton <scott@exussum.co.uk>
lib/private/Preview/Generator.php