You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whitehall currently uses Ghostscript to generate thumbnail icons for PDF attachments.
It's not clear whether this is even a useful feature (since most document cover pages look very similar and the thumbnail is too small for text to be readable), but if we want to keep generating these thumbnails then it's worth considering switching from Ghostscript to pdf.js to reduce the attack surface.
Ghostscript is 70+ MB of old code, mostly written in C , whereas pdf.js is way smaller and designed for security from the beginning.
See Keith's comment below. We just need to delete the thumbnail code and remove Ghostscript.
The text was updated successfully, but these errors were encountered:
The frontend rendering apps now handle attachments directly, and we just use generic icons. It should now be safe for the whitehall team to remove pre-rendering of attachments and the thumbnail rendering code, and get rid of Ghostscript.
sengi
added
the
security
Pull requests that address a vulnerability or otherwise improve security
label
Jun 16, 2024
sengi
changed the title
Consider using pdf.js for PDF thumbnail generation, or even just use a generic icon instead.
Remove obsolete PDF thumbnail generation feature and Ghostscript dependency
Jun 16, 2024
Whitehall currently uses Ghostscript to generate thumbnail icons for PDF attachments.
It's not clear whether this is even a useful feature (since most document cover pages look very similar and the thumbnail is too small for text to be readable), but if we want to keep generating these thumbnails then it's worth considering switching from Ghostscript to pdf.js to reduce the attack surface.Ghostscript is 70+ MB of old code, mostly written in C
, whereas pdf.js is way smaller and designed for security from the beginning.See Keith's comment below. We just need to delete the thumbnail code and remove Ghostscript.
The text was updated successfully, but these errors were encountered: