Skip to content
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

rtorrent crahes upon invalid XMLRPC logic #854

Open
lps-rocks opened this issue Mar 31, 2019 · 1 comment · May be fixed by #1251
Open

rtorrent crahes upon invalid XMLRPC logic #854

lps-rocks opened this issue Mar 31, 2019 · 1 comment · May be fixed by #1251

Comments

@lps-rocks
Copy link
Contributor

rTorrent can be crashed by sending invalid logic through XMLRPC interface. Issuing a d.multicall with an f. parameter causes rTorrent to crash unconditionally. XMLRPC commands should never cause a crash. They should be handled gracefully and an error returned to the connecting client.
using python xmlrpc.client library

import xmlrpc.client
server = xmlrpc.client.ServerProxy("http://127.0.0.1/rutorrent/plugins/rpc/rpc.php")
server.d.multicall("", "d.hash=", "d.is_multi_file=", "f.get_path=")

results in rTorrent crashing with

terminate called after throwing an instance of 'std::logic_error'
what():  basic_string::_M_construct null not valid
Aborted
kannibalox added a commit to kannibalox/rtorrent that referenced this issue Oct 1, 2023
@kannibalox
Copy link
Contributor

It turns out you could do the same crash with just rtxmlrpc f.path <hash>, looks like the target type check for files isn't actually using the template like the other targets.

kannibalox added a commit to kannibalox/rtorrent that referenced this issue Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants