Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always try and show pre rendered preview #20451

Merged

Commits on Aug 13, 2020

  1. 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>
    exussum12 authored and MorrisJobke committed Aug 13, 2020
    Configuration menu
    Copy the full SHA
    b12a390 View commit details
    Browse the repository at this point in the history
  2. Fix existing test and add a specific one for the new case

    Signed-off-by: Morris Jobke <hey@morrisjobke.de>
    MorrisJobke committed Aug 13, 2020
    Configuration menu
    Copy the full SHA
    8e24956 View commit details
    Browse the repository at this point in the history