django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

Directory table list item's URL action should not trigger a download #1427

Closed T4m closed 6 months ago

T4m commented 9 months ago

In the CMS admin, when listing the files, we have up to 4 action buttons, with the two firsts "URL" & "Download".

Before this change : Both were links (one canonical, one to the file in media).

Now both are download links.

IMHO :

It became more difficult to display the file in the browser without downloading it. (Now only "right click > open url" allows it.)

So, in short, line 143 in this version of "filer/templates/admin/filer/folder/directory_table_list.html" should be removed.

Also, I noted that the feature name of the PR is "Styling update", but this change is really a behavior update.

T4m commented 9 months ago

I created the related pull request

fsbraun commented 9 months ago

@T4m There's a security concern allowing to open files directly in the browser window: SVG filers may contain potentially malevolent JavaScript code. Starting from filer 3.1 the plan is as follows:

I hope this is an acceptable compromise between security and UX. @T4m What are your thoughts?

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.