Commit graph

67 commits

Author SHA1 Message Date
Chocobo1
74a2168bc1
Define and use a proper HTTP header structure 2020-05-10 02:53:11 +08:00
Chocobo1
957d697aee
Prebuild HTTP headers as much as possible
This avoids some branching when building a HTTP response.
2020-05-10 02:50:13 +08:00
Thomas Piccirello
92ed5c76f3 Bump Web API version 2020-05-03 02:23:22 -07:00
sledgehammer999
480e732694
Bump Web API version 2020-04-25 00:20:15 +03:00
Chocobo1
bb80b378c1
Add ability to send custom HTTP headers 2020-04-23 12:13:01 +08:00
Chocobo1
d3d3f7dbb3
Add final specifier to classes
This allow compilers to generate more efficient code.
2020-04-17 13:18:40 +08:00
an0n666
026aad2c04 Remove deprecated strict super seeding mode from advanced settings 2020-04-07 09:54:32 +06:00
Chocobo1
b7e7d8019c
Use helper function to construct QString
This is shorter and avoids the need of 2 constructors.
2020-03-16 21:27:42 +08:00
FranciscoPombal
df2fbb1edc Bump Web API version 2020-01-13 11:41:59 +00:00
FranciscoPombal
691d5e5d89 WebUI: Implement "Secure" flag for session cookie
Closes #11724.

Option is enabled by default for users using qBittorrent's built-in HTTPS capabilities. This flag will never be set if qBittorrent is using plain HTTP.

Users using HTTPS reverse proxies, like "qbt <-> (http) <-> proxy <-> (https) <-> user" should override the flag in the proxy in order to set it, if they wish to do so.
2019-12-23 17:58:08 +00:00
sledgehammer999
1376e051df
Bump Web API version 2019-12-18 00:20:27 +02:00
sledgehammer999
eff0208382
Bump Web API version
Closes #11403
2019-11-11 02:18:59 +02:00
sledgehammer999
009ccbef7f
Bump Web API version
Closes #11304
2019-10-27 17:20:28 +02:00
Chocobo1
f907328bdc
Add const to class function 2019-08-14 20:29:01 +08:00
Chocobo1
230949ee3b
Cache and reuse detected MIME type 2019-08-14 17:51:19 +08:00
Mike Tzou
7f1bff4eb4
Merge pull request #11017 from Chocobo1/apictrl
Improvements to APIController class
2019-08-06 10:17:27 +08:00
Chocobo1
e90a2c00a5
Replace QList by QVector 2019-08-05 20:56:15 +08:00
Chocobo1
f4e7b8c6bf
Replace QMap with QHash 2019-08-05 09:51:39 +08:00
Chocobo1
89124bdcc8
Add WebAPI session timeout settings
Raise default timeout to 1 hour.
2019-06-15 18:57:19 +08:00
Chocobo1
375de4f8a6
Replace QMap with QHash when sensible 2019-05-01 11:09:25 +08:00
Chocobo1
49b57904f9
Use a random number for WebUI cache busting
Also fetch qbt version info via WebAPI properly.
2019-04-18 12:31:23 +08:00
Vladimir Golovnev (Glassez)
2ce3aa9731
Drop legacy WebAPI support 2019-01-10 20:16:06 +03:00
Chocobo1
e98d4e874f
Unify translation files loading action
Since it is possible alternative WebUI could be coded in languages other than English,
WebUI must be able to load user-provided webui_en.qm.
At least one translated string must exist in order to generate an usable .qm file.
2018-12-18 23:14:09 +08:00
Mike Tzou
deed457764
Merge pull request #9993 from Chocobo1/referer
Enforce referrer-policy in WebUI
2018-12-14 13:23:04 +08:00
Chocobo1
c1912e17c1
Revise CSP header
The majority of the CSP is tuned for built-in WebUI, it may not be
suitable for alternative UI.

Also add QLatin1String to strings. This code path is called repeatedly,
it is worth adding QLatin1String to squeeze out the last bit of
performance.
2018-12-13 15:31:32 +08:00
sledgehammer999
cd2c448e6d Bump Web API version 2018-12-11 00:41:18 -05:00
Chocobo1
344e47dcfb
Add option for WebUI Host header validation
Closes #9743.
2018-11-19 11:05:04 +08:00
Tom Piccirello
41462a39c7
Bump WebAPI version 2018-10-17 10:54:40 -04:00
Vladimir Golovnev (Glassez)
c1a4ef1377
Use independent translation for WebUI 2018-10-09 11:10:08 +03:00
sledgehammer999
bdc788c824
Bump Web API version 2018-09-16 09:37:32 +03:00
sledgehammer999
ac1839fa6b
Bump Web API version 2018-08-12 21:08:42 +03:00
Chocobo1
e04aae686f
Cache more preference values
These values from Preference class are frequently used.
Also group related variables together.
2018-07-14 15:48:18 +08:00
Thomas Piccirello
8f98f87d12 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-05-31 00:54:57 -04:00
Mike Tzou
4a51f14328
Merge pull request #8967 from Chocobo1/protect
Add options to control WebUI security measures
2018-05-28 14:21:53 +08:00
sledgehammer999
6ad8d730cc
Bump Web API version 2018-05-27 19:23:25 +03:00
Chocobo1
9eeef0be97
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-05-22 12:57:03 +08:00
Chocobo1
bad4d94f77
Add option to control WebUI clickjacking protection
Some users actually want embedding WebUI into their custom build iframe.
Closes #7370.
2018-05-22 01:07:25 +08:00
Chocobo1
92a4e73a22
Apply locale changes immediately in WebUI 2018-05-13 15:05:29 +08:00
Chocobo1
fdf3ebbb6c
Remove usage of deprecated functions
Also use proper type for storing date/time data
2018-03-09 19:20:58 +08:00
Mike Tzou
5261d4375f
Merge pull request #8551 from Chocobo1/override
Fix warnings from linters
2018-03-09 00:36:52 +08:00
Chocobo1
c60b7b213e
Add missing 'override' specifier
This fixes clang warning:
'notify' overrides a member function but is not marked 'override'
[-Winconsistent-missing-override]
2018-03-07 20:05:52 +08:00
Vladimir Golovnev (Glassez)
1aca3b0adc
Parse URL query string at application level 2018-03-04 17:08:48 +03:00
Vladimir Golovnev (Glassez)
34456a7459
Fix Legacy Web API to be fully available 2018-02-28 18:25:48 +03:00
Vladimir Golovnev (Glassez)
27d8dbf13b
Redesign Web API
Normalize Web API method names.
Allow to use alternative Web UI.
Switch Web API version to standard form (i.e. "2.0").
Improve Web UI translation code.
Retranslate changed files.
Add Web API for RSS subsystem.
2018-01-28 19:16:24 +03:00
thalieht
525fdd6c2b Coding style, use nullptr and other minor things 2017-10-08 10:20:54 +03:00
Thomas Piccirello
771033a449
Add auto torrent management to webui context menu (addresses #6815) 2017-08-14 23:14:46 +08:00
Thomas Piccirello
798c230634
Add option to rename torrent from WebUI
Addresses #6815.
2017-08-13 15:45:51 +03:00
Tom Piccirello
07a85a1018 Set torrent location from webui context menu (addresses #6815) (#7062)
* Add option to set torrent location from webui context menu (addresses #6815)

* Update debug messages

* Use logger

* Remove redundant curly braces

* Remove message

* Use log message from transferlistwidget

* Use QDir

* Remove unused import

* Check if newLocation is an empty string
2017-08-06 17:04:39 +08:00
Chocobo1
3933790bda Add new webUI API. Closes #6457.
Now getting piece information for a specific torrent is possible via:

* Returns an array of states (integers) of pieces in order. Defined as:
  "0=not downloaded", "1=downloading", "2=downloaded".
  GET /query/getPieceStates/<torrent_hash>

* Returns an array of hashes (strings) of pieces in order:
  GET /query/getPieceHashes/<torrent_hash>
2017-05-26 14:37:03 +08:00
Eugene Shalygin
c4e16aa820 cmake: set warning and error options
The set is far from perfect, but guards against common errors with GCC.
2017-04-29 13:30:28 +02:00