I'm tracking down a permission-issue with Media and multiform, and it led me to this part of the code in this module (file_entity.pages.inc line 237). The function checks update access on the file and if the multiform module exists before sending the user off the /admin/content/file/edit-multiple/%; but, the media module provides that path. There is no check to see if that module exists before sending the user there.
I didn't dig too much deeper - so perhaps I'm wrong about this. Thought I should report it though.
The other issue, which I think is media's fault, is that that path is only accessible to users with the 'edit all files' permission. This module is not checking that before sending them - and it's causing me to land on a 403 after multiple uploading.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | file_entity-missing_checks_on_multiupload-1870532-10.patch | 1.12 KB | ParisLiakos |
| #4 | file_entity-missing_checks_on_multiupload-1870532-1.patch | 1.26 KB | mstef |
Comments
Comment #1
mstef commentedWell actually, even if it's not redirecting to the multiform, it sends the user to admin/content/file, which requires "administer files" permission (never checked before redirecting there).
Comment #2
mstef commentedComment #3
mstef commentedComment #4
mstef commentedThis corrects all the issues in the submit handler; but needs to be reviewed to make sure that's how you want to handle it.
Comment #5
ParisLiakos commentedthanks
seems good, besides that module_exists on media is not needed
Comment #6
mstef commentedWe don't have to check that media exists before sending a user to a page provided by the module? I don't see a check anywhere else. Maybe I missed something.
Comment #7
ParisLiakos commentedadmin/content/file is provided by file_entity module if i am not wrong:)
Comment #8
mstef commentedYes, but we are potentially redirecting to admin/content/file/edit-multiple, which is declared in media_menu() (not sure why though..).
Comment #9
ParisLiakos commentedah...yeah, i suppose this path should be registered in file_entity...
hrmpff..i see..thats a different issue..i think this is rtbc
thanks!
Comment #10
ParisLiakos commenteda bit simpler patch, checking with bot
Comment #11
ParisLiakos commentedcommited here http://drupalcode.org/project/file_entity.git/commit/f7b9744