Commit graph

8704 commits

Author SHA1 Message Date
Chocobo1
0287481001
Send Cache-Control header in WebUI responses
Tune the caching time to be shorter, in case there is a program
update.
Change the cacheability to private, as WebUI resources are not intended
to be cached at proxy.
For uncacheable responses, send out "no-store" explicitly to halt
browser caching.
2018-08-12 11:08:06 +03:00
Chocobo1
0167496ecb
Add changelog link in program updater
Closes #8997.
2018-08-12 11:08:06 +03:00
Thomas Piccirello
d86cf193a0
Rename variables for clarity 2018-08-12 11:08:06 +03:00
Thomas Piccirello
246cad1108
Add form-action to CSP
This option restricts all form submissions to the WebUI's origin.
qBittorrent only ever submits forms to the origin, so this is intended as a security measure.
2018-08-12 11:08:06 +03:00
Thomas Piccirello
23bf86a8a8
Add upgrade-insecure-requests to CSP when HTTPS is enabled
This option automatically upgrades all http connections to https.
It ensures http urls cannot be accessed when in https mode, and is intended as a security measure.
2018-08-12 11:08:06 +03:00
thalieht
6ce4c885b9
Fix coding style 2018-08-12 11:08:06 +03:00
Chocobo1
faf84e483a
Reset WebUI ban counter on login success 2018-08-12 11:08:06 +03:00
Chocobo1
576004c840
Add logging messages in WebUI login action 2018-08-12 11:08:06 +03:00
Chocobo1
c93b05c293
Replace QRegExp with QRegularExpression
Revise `static` keyword usage, static is added to frequently used
instances.
2018-08-12 11:08:06 +03:00
Chocobo1
55c3813fac
Cleanup header include order
Add missing header.
Cleanup license.
2018-08-12 11:08:06 +03:00
Chocobo1
725c6857be
Improve WebUI security measures
CSP was erroneously disabled in bad4d94f77
when clickjacking protection is off, now it is back.
Also added CSP 'frame-ancestors' directive when clickjacking
protection is enabled.
2018-08-12 11:08:06 +03:00
Chocobo1
86767c9ab4
Refactor function 2018-08-12 11:08:06 +03:00
Chocobo1
46aa631d2b
Improve DownloadFromURL behavior
URL should be considered case sensitive.
2018-08-12 11:08:06 +03:00
Chocobo1
7c61a937c9
Move DownloadFromURLDialog to its own file
Simplify code, no functionality changes.
Remove debug messages.
Capitalize dialog name.
Capitalize class name.
Update license text.
2018-08-12 11:08:06 +03:00
Chocobo1
b8d65dcc45
Add missing header include 2018-08-12 11:08:06 +03:00
Vladimir Golovnev (Glassez)
b9ab83eaf2
Don't use RSS feed URLs as base for file names
RSS feed URLs can be too long and exceed max path limit.
Add RSS feed UIDs and use UIDs as base for file names instead of URLs.
Closes #8399.
2018-08-12 11:08:06 +03:00
Chocobo1
8b7b563992
Add constexpr to IndexInterval class
Add const to IndexRange private members.
Remove redundant inline specifier.
Add missing parentheses.
2018-08-12 11:08:06 +03:00
Chocobo1
b813a878d7
Add constexpr to TriStateBool class 2018-08-12 11:08:06 +03:00
Chocobo1
54e486c389
Improve Utils::Version class
Add operator>=() and operator<=().
More methods are suitable to be constexpr.
Remove redundant boundary checking.
2018-08-12 11:08:06 +03:00
Chocobo1
12d0a3acc1
Add option to control CSRF protection
Some users are using WebUI with simple port-forwarding from their router,
providing an option to control the protection will save them from setting up an
non-trival web proxy.
Closes #7274.
2018-08-12 11:08:06 +03:00
Chocobo1
6ad2a13386
Add option to control WebUI clickjacking protection
Some users actually want embedding WebUI into their custom build iframe.
Closes #7370.
2018-08-12 11:08:06 +03:00
Chocobo1
2a9c401db9
Update Options dialog layout in WebUI 2018-08-12 11:08:06 +03:00
sledgehammer999
ea5a29018f
Bump to 4.1.1 2018-05-27 21:35:07 +03:00
sledgehammer999
c8d0a715e8
Update Changelog 2018-05-27 21:30:13 +03:00
sledgehammer999
2cfc6514ab
Sync translations from Transifex and run lupdate 2018-05-27 21:03:53 +03:00
sledgehammer999
1d78bc7206
Bump Web API version 2018-05-27 21:03:53 +03:00
Chocobo1
e5577e43f8
Replace raster qbt logo with vector version
Add helper function for svg icons.
2018-05-27 18:31:51 +03:00
Chocobo1
17c0463906
Fix GUI scaling factor on macOS
macOS seems have an unique way to handle widget size, that is, it doesn't require
application to resize widgets manually, Qt will handle the resize job
automatically.

Closes #8841.
2018-05-27 18:31:51 +03:00
Chocobo1
4168772904
Use 32px icons for favicon
One less resource to manage and 16px size can be downsampled from 32px
on-the-fly anyway.
2018-05-27 18:31:51 +03:00
sledgehammer999
44f2186749
Fix compilation without D-Bus support
Closes #8977
2018-05-27 18:31:51 +03:00
Chocobo1
0c918bcc3a
Initialize variables properly
The warnings are emitted when compiling on msys2, mingw

The warning was:
gui/torrentcontentmodel.cpp:135:33: warning: missing initializer for
member '_SHFILEINFOW::iIcon' [-Wmissing-field-initializers]

..\..\qBittorrent\src\app\stacktrace_win.h:141:30: warning: missing
initializer for member '_IMAGEHLP_LINE64::Key'
[-Wmissing-field-initializers]
2018-05-27 18:31:51 +03:00
sledgehammer999
0a8925dc75
Suppress multiple I/O errors for the same torrent
When a file error happens libtorrent spews a ton of `file_error_alert`
which result in log floods and notification balloon floods. The later
might render the program inaccessible because the constant
notifications prevent the user from interacting with the tray icon.

Closes #8934
2018-05-27 18:31:51 +03:00
airium
a446597597
Update strace_win to stacktrace in conf.pri.windows
It is advised to update the stack trace statement since #8701, otherwise people may forget to change it, which results in that no pdb file is generated for Windows distribution package.
2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
54354a2732
Add missing 'return' statement 2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
d94b8f08ab
Use RSS feed update time as a fallback
Some sites omit publication date in its RSS feed articles
that prevents "Ignore Subsequent Matches" to work properly.
Closes #8959.
2018-05-27 18:31:51 +03:00
Chocobo1
0d8189efeb
Relax behavior of "Download first and last piece first"
Now it applies the setting to all files in torrent, no matter whether
the file is previewable or not.

Torrent client shouldn't be smart by deciding which file this
option will be applied to, i.e. it should just follow the user's decision.
2018-05-27 18:31:51 +03:00
Chocobo1
00c886e426
Refactor code
Add const to variables.
Add Logger message.
Simplify code logic.
2018-05-27 18:31:51 +03:00
Chocobo1
551fc35439
Simplify the saving & loading of a setting
Remove excessive usage of constexpr.
2018-05-27 18:31:51 +03:00
Chocobo1
9ff17c8d9d
Make use of QStringLiteral
Only changed instances that are initialized at program start.
2018-05-27 18:31:51 +03:00
Chocobo1
ec37732e99
Use smaller type 2018-05-27 18:31:51 +03:00
adem
8a414f32a8
Update Windows icons 2018-05-27 18:31:51 +03:00
sledgehammer999
bac06acb49
Fix Stats dialog size
Partially reverts e31ec20ec4.
Closes #8870.
2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
ae1e3c2a81
Rename torrent if content was initially renamed
Closes #8910.
2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
67940eb0f9
Place "Use Smart Episode Filter" more correctly 2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
007aa8480e
Make "Ignoring days" to behave like other filters
This prevents confusing in GUI when it shows matched RSS
articles which be really ignored by the rule.
2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
dedec10c58
Improve code of RSS auto-downloading rule
Closes #8933.
2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
75219e21be
Add last used save path to the front of history 2018-05-27 18:31:51 +03:00
Evgeny Lensky
10f5964f8e
Fix open destination folder with Nautilus > 3.28
Closes #8923.
2018-05-27 18:31:51 +03:00
Chocobo1
a4a64d51c0
Improve "Run External Program" behavior
This follows utorrent behavior: they don't append backslash character at
the end of path variables.
Closes #8836.
2018-05-27 18:31:51 +03:00
Vladimir Golovnev (Glassez)
1014313d88
Rename RSS properties to follow other names 2018-05-27 18:31:51 +03:00