mirror of
https://github.com/transmission/transmission.git
synced 2026-02-14 23:19:34 +00:00
fix: discard any non-int tag when converting to tr4 (#8017)
Co-authored-by: reardonia <2925104+reardonia@users.noreply.github.com>
This commit is contained in:
@@ -786,6 +786,10 @@ void convert_jsonrpc(tr_variant::Map& top, State const& state)
|
||||
{
|
||||
top.erase(TR_KEY_jsonrpc);
|
||||
top.replace_key(TR_KEY_id, TR_KEY_tag);
|
||||
if (auto const tag = top.find_if<int64_t>(TR_KEY_tag); state.was_jsonrpc && tag == nullptr)
|
||||
{
|
||||
top.erase(TR_KEY_tag);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.is_response && is_legacy && state.is_success && state.was_jsonrpc)
|
||||
|
||||
Reference in New Issue
Block a user