Documents and Media file extension restrictions don't apply to wiki attachments (mime type restrictions)

Issue

  • If I go to Control Panel/System Settings/Content and Data/Documents and Media/Service and in the File Extensions field I replace * with .jpg, in order to allow only jpg files to be added to Documents and Media.
  • And then I attach some other kind of file (e.g. a pdf, or png file) as an attachment to a wiki page (note that we didn't make any changes to the wiki allowed mime types at Control Panel/System Settings/Wiki/File Uploads/Allowed Wiki Attachment Mime Types, so by default, all mime types are allowed for wiki attachments)
  • The operation is successful and if you go to Documents and Media, you see that this png file was added there under the hidden com.liferay.wiki folder. (you need use dl.show.hidden.mount.folders=true in your portal-ext to see the hidden folder) 
  • Shouldn't this operation fail, because although Wiki settings allow all mime types, Documents and Media is restricted only to jpg files, and since this wiki attachment eventually ends up in Documents and Media (even though in a hidden folder), Documents and Media should have stopped it when sensing the non-jpg file?

Environment

  • 7.4 (probably earlier versions as well)

Resolution

  • This is not a bug, but the expected behavior.
    DL configuration is only applied to DM interface/service and not to other client apps: that's why each of them has a different configuration to its own repository.
     
  • As a side note, about the use of
    dl.show.hidden.mount.folders
    property to show those hidden folder: this is an administrative tool that allows to see all this repositories in the user interface but does not have any value about service use or configuration. In fact it is not recommended to use it to avoid users handle repositories using the web interface and break the contents by accident.

 

 

Este artigo foi útil?
Utilizadores que acharam útil: 0 de 1