-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/6700 #6738
Fix/6700 #6738
Conversation
75fc363
to
2183121
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great finding, but it seems that the fix is incomplete. When I launch run_tribler.py
with a torrent path as an argument and the torrent name contains URI-encoded characters, Tribler still cannot download the torrent. For example, if I try to download the file ubuntu%2021.10-desktop-amd64.iso.torrent
(note a %20
sequence which represents a space character), I see the following error after Tribler is started:
As the bug is related to URI-escaped characters, I think it is better to add a test with a torrent file name that contains such characters.
29d8273
to
7e6d3f3
Compare
Our tests use |
b02b7a3
to
e791fbe
Compare
Kudos, SonarCloud Quality Gate passed! |
This PR fixes #6700.
The problem was the interaction between GUI and Core by using REST. In particular, the problem was in the manual URI serializing by using
quote_plus_unicode
and manual URI deserializing by usinguri_to_path
.I removed both serializing and deserializing procedures by replacing them with the native
aiohttp
mechanism (by usingparams
). The currentquote/unquote
processing is performed by https://github.com/aio-libs/yarl/.The funny fact is that they had a bug for
yarl
belowv1.6.3
and our manualquote/unquote
mechanism (now removed) had kinda the same bug.During investigation procedures, two functions have been extracted from
run_tribler.py
:run_core
run_gui
During the PR the following bugs were fixed:
import encodings.idna
removes by IDE as unusedSentryStrategy.SEND_SUPPRESSED
has been set for the core from the GUI application