| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Trac: https://dev.deluge-torrent.org/ticket/3521
Closes: https://github.com/deluge-torrent/deluge/pull/385
|
|
|
|
| |
Closes: https://github.com/deluge-torrent/deluge/pull/384
|
|
|
|
|
|
|
| |
Fix ValueError crash for console users with Python 3.10
Trac: https://dev.deluge-torrent.org/ticket/3518
See-also: https://docs.python.org/3/whatsnew/3.10.html#curses
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Temporary files created while download host html page are no cleaned up
if the download fails.
Fixed by adding a 'finally' step in the callback chain to delete any
created temporary files.
Added tests to ensure the temporary files are deleted, using a fixture
that creates a known filename for the test.
Trac: https://dev.deluge-torrent.org/ticket/3167
|
|
|
|
|
|
|
|
|
|
|
| |
User reported infinite redirecting when attempting to fetch tracker
icon.
Fixed by allowing httpdownloader and RedirectAgent to handle page
redirects including catching infinite redirects
Trac: https://dev.deluge-torrent.org/ticket/3167
See-also: https://github.com/twisted/twisted/blob/5c24e9/src/twisted/web/client.py#L168
|
|
|
|
|
|
|
|
|
|
|
| |
When several torrents are being removed from session, an exception was
being raised in a callback function `on_status` with the `torrent_id` of
one (or more) of the removed torrents.
Now we will catch when the torrent does not exist anymore and print a
debug log about it.
Closes: https://dev.deluge-torrent.org/ticket/3498
Closes: https://github.com/deluge-torrent/deluge/pull/341
|
|
|
|
|
| |
With the move to pytest remove remainings documentation or comments that
refer to Trial.
|
|
|
|
|
|
|
|
|
| |
There is a problem in the Deluge's Console UI. This UI supports the j
and k keys as up and down, but for some reason they are inverted. This
commit inverts back the behaviour of j and k in several places.
Resolves: https://dev.deluge-torrent.org/ticket/3483
Closes: https://github.com/deluge-torrent/deluge/pull/377
|
|
|
|
|
|
| |
This propery cause issue with added extra space in the entries, likely a
minor GTK bug and property being leftover from GTK2 migration. The
default is True and should have no effect since no icon is shown.
|
|
|
|
| |
Replace table with grid and use single column for entries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A visual problem with the port spin button meant that the port number
was not fully visible in the entry field.
The problem is related to icon activatable property value set to False
when default is True. Although no icon is used is creates a left-hand
5px space in the entry which narrows the available text space and the
entry does not expand to account for this.
Fixed by removing primary_icon_activatable and
secondary_icon_activatable properies so that default values of True is
used.
|
|
|
|
|
|
|
| |
socket.gethostbyname does not support IPv6 name resolution, and
getaddrinfo() should be used instead for IPv4/v6 dual stack support.
Closes: https://github.com/deluge-torrent/deluge/pull/376
|
|
|
|
|
|
|
|
| |
The torrent status num_peers and num_seeds was replaced for session
status keys by accident as part of replacing deprecated session keys
so revert those changes
Ref: 2bd095e5bf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should not be mangling the torrent data in the JSON API since this
can have unintended consquences with names and filepaths that can be
edited. If we escape those symbols in the JSON API then the data no
longer matches that stored by core. Therefore shift the encoding to the
client and consider dealing separetely with these entities when the user
first adds a torrent.
* Created a modified htmlEncode in Deluge Formatter based on extjs
method that also encodes single quotes.
* Removed renderers in ListViews since only templates specified via tpl
are used and any render attribute specified was a no-op.
* Removed old buggy escapeHtml
Resolves: https://dev.deluge-torrent.org/ticket/3459
Ref: https://docs.sencha.com/extjs/6.5.3/modern/src/String.js.html#Ext.String-method-htmlEncode
Ref: https://docs.sencha.com/extjs/3.4.0/source/Format.html#Ext-util-Format-method-htmlEncode
|
|
|
|
|
|
|
|
|
|
| |
Ensure all torrent attributes that might contain malicious HTML entities
are encoded.
By allowing HTML entities to be rendered it enable malicious torrent
files to perform XSS attacks.
Resolves: https://dev.deluge-torrent.org/ticket/3459
|
|
|
|
|
|
|
|
|
| |
Could not see more than one host when connection manager opens so need to
scroll or resize window
Increased default height to now show three hosts when first opens
Closes: https://dev.deluge-torrent.org/ticket/3431
|
|
|
|
|
|
|
|
|
|
|
|
| |
if move_completed is checked/True, options should be updated, not the
other way round
The path was updated the first time the move_completed option is selected
and then ignored on further updated to the path.
Fixed by checking instead if the path has changed.
Closes: https://github.com/deluge-torrent/deluge/pull/374
|
|
|
|
|
|
|
|
|
|
|
| |
Notable changes:
* Prettier >=2.3 with more consistent js assignments
* Black now formats docstrings
* Added isort to list of autoformaters
* Update flake8 config for v4
Ref: https://prettier.io/blog/2021/05/09/2.3.0.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of the process of adding support to LT 2.0, we should stop using
all deprecated function, as some (if not all) were removed.
For this process, we should use the LT 1.2 upgrade (guide)[1].
The change includes:
* stop using file entries directly
* start using the torrent handle's set/unset flags
* stop using url key in add_torrent_params (for magnet)
* stop accessing resume_data from save_resume_data_alert
* stop using deprecated session status keys in UI
[1] https://libtorrent.org/upgrade_to_1.2-ref.html
Closes: https://dev.deluge-torrent.org/ticket/3499
Closes: https://github.com/deluge-torrent/deluge/pull/342
|
|
|
|
|
|
|
|
|
|
|
| |
Errors were raised when trying to add a new daemon account due to dialog
being destroyed before looking up widget values.
Fixed by saving widget values before destroying.
Refactored code to be simplified with a named tuple for the account
details instead of separate attributes and modernized the preferences
dialog creation and account saving by replacing callback functions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests in connectionmanager for when a host is online are broken
and always considers a host as online.
When an error occurs in e.g. in _on_connect_fail, report_message()
in PopupsHandler expects the message to be string, not a Twisted Failure.
Fix by checking if message is string and log a warning before converting
to string.
Closes: https://github.com/deluge-torrent/deluge/pull/277
|
|
|
|
|
|
|
|
|
| |
An optimization that avoided re-rendering treeview cells sometimes
went wrong, and rendered a value from the wrong row when moving
the mouse around the torrentview window.
Closes: https://dev.deluge-torrent.org/ticket/3500
Closes: https://github.com/deluge-torrent/deluge/pull/371
|
|
|
|
|
|
|
|
|
|
| |
A problem with GdkPixbuf loaders on Windows causes a hard crash when
attempting to load ico or gif tracker icons.
Added a workaround by skipping these icon types until a more permanent
solution is found.
Ref: https://dev.deluge-torrent.org/ticket/3501
|
|
|
|
|
| |
The functionality of get_pixbuf and get_pixbuf_at_size is almost
identical so reuse get_pixbuf with an optional size arg.
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new Config class parameter `log_mask_funcs` to enable config
instances hide sensitive information that would normally appear in
config debug logs.
Added mask password function to hostlist to replace passwords with '*'s
in logs.
Closes: https://github.com/deluge-torrent/deluge/pull/363
|
|
|
|
|
| |
Closes: https://dev.deluge-torrent.org/ticket/1556
Closes: https://github.com/deluge-torrent/deluge/pull/356
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed crash when sys.stdout was None
When using pythonw on windows, sys.stdout and stdin are None. We had a
legacy unicode_argv handler that was crashing in this instance. Just
removed that, since sys.argv is always unicode on python 3 to fix the
crash.
Closes: https://github.com/deluge-torrent/deluge/pull/361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all the twisted.trial tests to pytest_twisted. Also move off of unittest.TestCase as well. Seems there were several tests which weren't actually testing what they should, and also some code that wasn't doing what the broken test said it should.
Goals:
Remove twisted.trial tests
Move to pytest fixtures, rather than many classess and subclasses with setup and teardown functions
Move away from self.assertX to assert style tests
FIx broken tests
Going forward I think these should be the goals when adding/modifying tests:
* Don't use BaseTest or set_up tear_down methods any more. Fixtures should be used either in the test module/class, or make/improve the ones available in conftest.py
* For sure don't use unittest or twisted.trial, they mess up the pytest stuff.
* Prefer pytest_twisted.ensureDeferred with an async function over inlineCallbacks.
- I think the async function syntax is nicer, and it helps catch silly mistakes, e.g. await None is invalid, but yield None isn't, so if some function returns an unexpected thing we try to await on, it will be caught earlier. (I struggled debugging a test for quite a while, then caught it immediately when switching to the new syntax)
- Once the maybe_coroutine PR goes in, using the async syntax can also improve tracebacks when debugging tests.
Things that should probably be cleaned up going forward:
* Remove BaseTestCase
* Remove the subclasses like DaemonBase in favor of new fixtures.
* I think there are some other utility subclasses that could be removed too
* Perhaps use parameterization in the ui_entry tests, rather that the weird combination of subclasses and the set_var fixture I mixed in.
* Convert some of the callback stuff to pytest_twisted.ensureDeferred tests, just for nicer readability
Details relating to pytest fixtures conftest.py in root dir:
* https://github.com/pytest-dev/pytest/issues/5822#issuecomment-697331920
* https://docs.pytest.org/en/latest/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
Closes: https://github.com/deluge-torrent/deluge/pull/354
|
|
|
|
|
|
|
|
|
|
| |
Up until now, when closing the Add or Edit dialogs, of the `Edit Torrents`, using the top-right X
button or using the Escape key, they were being destroyed without any way to reopening them, and
it was breaking the `Edit Torrents` window itself.
Now both dialogs have the right handlers for handing the closing process without breaking anything.
Closes: deluge-torrent/deluge#324
Closes: https://dev.deluge-torrent.org/ticket/2434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libtorrent now supports interface names instead of just IP address so
add new common functions to validate user input.
* Added is_interface that will verify if a libtorrent interface of name
or IP address.
* Added is_interface_name to verify that the name supplied is a valid
network interface name in the operating system.
On Windows sock.if_nameindex() is only supported on 3.8+ and does not
return a uuid (required by libtorrent) so use ifaddr package. Using git
commit version for ifaddr due to adapter name decode bug in v0.1.7.
On other OSes attempt to use stdlib and fallback to ifaddr if installed
otherwiser return True.
* Added tests for is_interface & is_interface_name
* Updated UIs with change from address to interface
* Updated is_ipv6 and is_ipv4 to used inet_pton; now supported on
Windows.
Ref: https://github.com/pydron/ifaddr/pull/32
Closes: https://github.com/deluge-torrent/deluge/pull/338
|
|
|
|
|
|
|
|
| |
We should not let anyone know the account's password length,
as it can help to crack it.
Instead, we will print a constant amount (10) of asterisks.
Closes: https://github.com/deluge-torrent/deluge/pull/346
|
| |
|
|
|
|
|
|
|
|
|
| |
this will lined-up with the WebUI, which already have this option.
in addition, it will not open the Add Torrent URL dialog after copied,
which happens automatically when there is torrent/magnet URIs in the clipboard.
Closes: deluge-torrent/deluge#328
Closes: https://dev.deluge-torrent.org/ticket/3489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A UnicodeDecodeError is raised in transfer module when attempting to
prefetch a magnet.
This is result of passing a Python dict containing text bytes and raw
bytes that cannot be decoded as utf-8 in rencode when recieving the
message. This could be handled in rencode by returning raw bytes if
decoding fails (perhaps with a strict mode?) however better to follow
convention of encoding raw bytes in base64 in API calls.
Fixed by retaining bencoding and encoding with base64 when sending
result.
Resolves: https://github.com/deluge-torrent/deluge/pull/334
|
|
|
|
|
|
|
|
|
| |
This happened due to the removal of `exception_msg` attribute, which was
removed with the changes to `RPC` protocol in commit 9b812a4.
Now we access the message using the `message` attribute.
Closes: deluge-torrent/deluge#332
Closes: https://dev.deluge-torrent.org/ticket/3069
|
|
|
|
|
|
|
| |
After downloading and resizing the new icon, we try to remove the downloaded
file, which is larger, but it fails because it tries to do so when the file
is still open, and therefor locked.
On close of the UI, we got `PermissionError` exceptions for each new icon.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing the site's page in search for the FAVICON, the page gets opens.
The default file encoding in dependent on the running OS, and might not
be `UTF-8` on Windows.
Therefor, some trackers might not get their icon downloaded at all because of
an error:
`UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 2158: character maps to <undefined>`.
This fix adds a detection of file encoding using the optional `chardet` dependency, and also a test.
Closes: deluge-torrent/deluge#333
Closes: https://dev.deluge-torrent.org/ticket/3479
|
|
|
|
|
|
|
| |
This makes the download location entry textbox resizable which is very
useful for entering long paths.
Closes: deluge-torrent/deluge#295
|
|
|
|
|
|
|
|
| |
There is no promise that default bg is white and default fg is black so
define in deluge.css
Ref: https://dev.deluge-torrent.org/ticket/3435
Closes: deluge-torrent/deluge#330
|
|
|
|
|
|
|
|
|
|
| |
this switched was motivated by an error which happened each time the check
port button was clicked, and was caused by the GtkImage when loading the
loading.gif file on Windows:
cannot register existing type 'GdkPixbufGdipAnim'
Closes: deluge-torrent/deluge#329
|
|
|
|
|
|
|
|
| |
Deluge fails to appear in some app launchers (GNOME app search, Albert launcher) when searching for just "torrent" or other keywords, rather than "bittorrent". This is due to the lack of a Keywords header/property in its desktop entry file. Adding this line should solve the issue.
I don't know if the underscore "_" is actually necessary for this line, I just copied the appearance of the lines above it when inserting. Please check that this comes out without the underscore in the final file after processing.
Closes: deluge-torrent/deluge#323
|
|
|
|
|
|
|
|
| |
Added pyupgrade utility with manual stage to pre-commit and run on all
files.
Ref: https://github.com/asottile/pyupgrade
Closes: deluge-torrent/deluge#326
|
|
|
|
|
|
|
|
|
|
|
| |
SVG files are supported by all browsers so need to support it as well,
according to https://www.w3schools.com/html/html_favicon.asp
Also, it appears as SEO.com site, which was dropped because of a cert issue,
has only SVG icon. So enabled it again.
Lastly, from python 3.2, `os.path.samefile` is supported on Windows.
So Windows will now test TrackerIcons as well.
|
|
|
|
|
|
|
|
|
| |
* Removed all __future__ imports from code
* Removed all six dependencies
* Removed all future_builtins imports
* Removed all Python 2 related code
Closes: deluge-torrent/deluge#325
|
|
|
|
|
|
| |
The sort for Ascending was putting longest eta first but seems more
intuitive that the smallest time to wait should be first. The WebUI
in previous commit swapped this behaviour so updating GtkUI.
|
|
|
|
|
|
|
|
|
|
| |
When sorting the according to ETA values, all torrents with infinite value were being
considered a lower value (INF -> 12 -> 32) instead of largest (12 -> 32 -> INF).
This is due to the fact that the INF symbol is placed to lower value (<= 0).
Now the lower values are being treated as the largest JS number when sorting.
Closes: https://dev.deluge-torrent.org/ticket/3413
Closes: https://github.com/deluge-torrent/deluge/pull/321
|
|
|
|
|
|
|
|
| |
UIs should not depend on core directly, so removing the dependency in ConsoleUI.
This is done by adding a hard-coded variable.
Closes https://dev.deluge-torrent.org/ticket/3491
Closes: https://github.com/deluge-torrent/deluge/pull/320
|
|
|
|
|
|
|
|
|
| |
With this change, we drop a core dependency from the UI. This will help group together
all related functionality in one place, i.e. all security related functions.
Also updated testssl.sh version to 3.0.6 (SECURITY_TEST)
Closes: deluge-torrent/deluge#288
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some users encoutered a bug where WebUI in browser show a white screen,
which indicates a problem with loading javascript files. The problem was
due to closure minifying failure leaving a zero-length deluge-all.js
file which broke the usual fallback mechanism to debug files.
* Fixed usage of ES6 const declaration breaking closure minifying.
* Cleanup minified files upon errors so no zero length files left
* Replaced broken and unmaintained slimit with rjsmin.
* Fixed unable to set dev or debug query args due to request args
requiring bytes.
|
|
|
|
|
| |
Closes #2434
Closes: deluge-torrent/deluge#253
|