Repository navigation
xmlrpc proxy: refuse rtorrent's old names of refused commands - #3571
Merged
Merged
Conversation
rtorrent registers directory and session as redirects to directory.default.set and session.path.set, and scgi_port and scgi_local to network.scgi.open_port and network.scgi.open_local. The proxy refused the commands but not these names and forwarded them untrusted, which a daemon that ignores the untrusted flag, such as stock 0.9.8, runs: a caller could move the default download directory outside $topDirectory. d.directory.base.set, the 0.16 name of d.directory_base.set, was also not held to the directory boundary. All five are now resolved through $canonicalNames. RtorrentCommandRedirectsFixture.php lists every redirect in the src/ trees of rtorrent v0.9.8 and v0.16.28, and XMLRPCProxyDaemonRedirectTest requires each to get the same decision as the command it names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rtorrent registers directory and session as redirects to directory.default.set and session.path.set, and scgi_port and scgi_local to network.scgi.open_port and network.scgi.open_local. The proxy refused the commands but not these names and forwarded them untrusted, which a daemon that ignores the untrusted flag, such as stock 0.9.8, runs: a caller could move the default download directory outside $topDirectory. d.directory.base.set, the 0.16 name of d.directory_base.set, was also not held to the directory boundary.
All five are now resolved through $canonicalNames. RtorrentCommandRedirectsFixture.php lists every redirect in the src/ trees of rtorrent v0.9.8 and v0.16.28, and XMLRPCProxyDaemonRedirectTest requires each to get the same decision as the command it names.