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
Due to legacy reasons, the mimetype aliases are stored in a JS file that is directly loaded at page load time instead of asynchronously.
Instead of generating it and checking in the file "core/js/mimetypelist.js", we should provide an app framework route to retrieve it asynchronously.
In the JS side, we need to make sure that any app that needs it is using a promise when retrieving this information as it would be retrieved asynchronously instead of being available at page load.
Once this is done, remove the "mimetypelist.js" exclusion from integrity check.
It might be better to use a custom mimetype list file to override whatever is in the "official" mimetypelist.js file. The idea is similar to what is used in other parts of ownCloud: get the data from the mimetypelist.js file and override or extend that data with the contents of another custom file if needed.
The mimetypelist.js will keep being hashed while the other custom file won't.
I didn't take theming into consideration, but anyway, an additional custom file could come in handy. We could have 3 different files: core's mimefiletype.js, the one coming from theming, and the last one from a custom location maybe configured through the config.php file.
The priority would be: core < theming < custom. This could work because there will be only one active theme, so no competition among themes will happen, and the priorities are quite clear. Anyway, it's something to decide what we'll allow.
Particularly, I think everything we package should be hashed. Unless the mimetypelist.js can be safely removed from ownCloud, it must be hashed. If the file can be removed without affecting ownCloud, we can say it's a example file that can be edited, but only if this is the case
Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
Activity
jvillafanez commentedon Sep 11, 2017
Copying myself from #28973....
It might be better to use a custom mimetype list file to override whatever is in the "official" mimetypelist.js file. The idea is similar to what is used in other parts of ownCloud: get the data from the mimetypelist.js file and override or extend that data with the contents of another custom file if needed.
The mimetypelist.js will keep being hashed while the other custom file won't.
I didn't take theming into consideration, but anyway, an additional custom file could come in handy. We could have 3 different files: core's mimefiletype.js, the one coming from theming, and the last one from a custom location maybe configured through the config.php file.
The priority would be: core < theming < custom. This could work because there will be only one active theme, so no competition among themes will happen, and the priorities are quite clear. Anyway, it's something to decide what we'll allow.
Particularly, I think everything we package should be hashed. Unless the mimetypelist.js can be safely removed from ownCloud, it must be hashed. If the file can be removed without affecting ownCloud, we can say it's a example file that can be edited, but only if this is the case
ownclouders commentedon Dec 19, 2017
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.PVince81 commentedon Dec 19, 2017
still valid