nelu / rutorrent-thirdparty-plugins

Plugins for ruTorrent web client, filemanager, fileshare, fileupload, mediastream
59 stars 43 forks source link

Strict MIME type checking breaks plugin in Chrome #14

Closed rastating closed 8 years ago

rastating commented 8 years ago

In Chrome, if the X-Content-Type-Options: nosniff header is sent, strict MIME type checking will be enabled, which prevents the settings.js.php file being executed on the client side.

The line of code that causes this problem can be found on Line 1767 of init.js:

injectScript('plugins/filemanager/settings.js.php');

Temporary workaround

If anyone else is having this problem and just wants to work around it, you could just replace the forementioned line with a hard copy of the output from settings.js.php. Not the prettiest of solutions, but will get you past it.