nelu / rutorrent-thirdparty-plugins

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

Fix script injection failing in Chrome #15

Closed rastating closed 8 years ago

rastating commented 8 years ago

As per issue #14, when using the filemanager plugin 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.

This change replaces the injectScript call with the use of the jQuery.get method to retrieve the contents of the file and eval it; allowing for the file to be included regardless of MIME type.