qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.78k stars 3.92k forks source link

WebUI does not work - all js are blocked by browsers #13967

Closed blackPantherOS closed 2 years ago

blackPantherOS commented 3 years ago

Please provide the following information

qBittorrent version and Operating System

unknown -> 4.3.x -> 4.4.0 alpha

If on linux, libtorrent-rasterbar and Qt version

1.2.11 / 5.15.1

What is the problem

All JS function is broken

What is the expected behavior

Cannot login, empty webui interface https://youtu.be/ZcLs1sVbhMQ

Steps to reproduce

enable webui, add login user - won't work Approve local user without login - interface is empty, does not work menu items

Extra info(if any)

Tested binaries: Fedora 33 RPM - https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/33/Everything/x86_64/Packages/q/qbittorrent-4.3.1-1.fc33.x86_64.rpm Mageia 8 RPM - https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/qbittorrent-4.3.1-1.mga8.x86_64.rpm blackPanther OS v18.1/v20.1 RPM - ftp://ftp.blackpantheros.eu/blackPanther/OS/All/v18.x/64bit/updates/qbittorrent-4.3.1-0.1bP.x86_64.rpm

I dont use any JS blocker

And tested with qBittorrent-nox as well with same results...:( The used browsers for tests: Chrome latest, Firefox 81, Opera blackPanther_20201213_093456

LANGUAGE=en QT_LOGGING_RULES="*=true;qt.*=false;log_kio_smb=true" KDE_FORK_SLAVES=1 qbittorrent Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use: QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors. QT_SCREEN_SCALE_FACTORS to set per-screen DPI. QT_SCALE_FACTOR to set the application global scale factor. org.kde.knotifications: service is "org.kde.StatusNotifierItem-11179-1" org.kde.knotifications: Registering a client interface to the KStatusNotifierWatcher org.kde.kwindowsystem: Loaded plugin "/usr/lib64/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so" for platform "xcb"

Browser console

Refused to execute script from 'http://127.0.0.1:8080/scripts/lib/mootools-1.2-core-yc.js' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/lib/mootools-1.2-more.js' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/preferences.js' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/mocha-init.js?locale=en&v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/lib/clipboard-2.0.0.min.js' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/filesystem.js?v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/misc.js?locale=en&v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/progressbar.js?v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/file-tree.js?v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/dynamicTable.js?locale=en&v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/client.js?locale=en&v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.
127.0.0.1/:1 Refused to execute script from 'http://127.0.0.1:8080/scripts/contextmenu.js?locale=en&v=d6m9qq' because its MIME type ('text/x-csrc') is not executable, and strict MIME type checking is enabled.

and

Uncaught ReferenceError: Hash is not defined
    at mocha-0.9.6-yc.js:1
FranciscoPombal commented 3 years ago

@blackPantherOS

Contrary to what you state, the video shows you do have some browser extensions, one of which looks like a shitty adblocker (tip: the only good adblocker is uBlock Origin) that may be blocking JS. Please try reproducing with all addons disabled first to establish a baseline.

Can't reproduce on Ubuntu 18.04 and 20.04, Firefox 83 with several addons including uBlock Origin.

Also, about the warnings you pasted from the "browser console" - which browser are these from?

blackPantherOS commented 3 years ago

The console warnings origin from Chrome 87.0.4280.88, yes I miss disabling Ad blocker when record the video but look at this too, and you will believe me I'm not use ad blockers

Firefox

blackPanther_20201213_122511

Looks in footer: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options

ghost commented 2 years ago

Duplicate of https://github.com/qbittorrent/qBittorrent/issues/11069