mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-06 06:09:22 +00:00
Give network.xmlrpc.size_limit.set a floor
A limit below any valid request rejects the request that would raise it again.
This commit is contained in:
@@ -172,6 +172,9 @@ RpcManager::set_size_limit(uint64_t size) {
|
||||
if (size > SCgiTask::max_content_size)
|
||||
throw torrent::input_error("XMLRPC size limit cannot exceed the SCGI content size limit.");
|
||||
|
||||
if (size < min_size_limit)
|
||||
throw torrent::input_error("XMLRPC size limit is too small to hold a request.");
|
||||
|
||||
m_xmlrpc.set_size_limit(size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user