app: shallow copy arguments before passing to a request
This prevents a scenario where a request handler mutates the arguments of a WebRequest, which could result in changing the default "request_arguments" in "InternalTransport.call_method()". Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
fb2eacf702
commit
2e4814978f
|
@ -162,7 +162,7 @@ class InternalTransport(APITransport):
|
||||||
# Request arguments can be suppplied either through a dict object
|
# Request arguments can be suppplied either through a dict object
|
||||||
# or via keyword arugments
|
# or via keyword arugments
|
||||||
args = request_arguments or kwargs
|
args = request_arguments or kwargs
|
||||||
return await func(WebRequest(ep, args, action))
|
return await func(WebRequest(ep, dict(args), action))
|
||||||
|
|
||||||
class MoonrakerApp:
|
class MoonrakerApp:
|
||||||
def __init__(self, config: ConfigHelper) -> None:
|
def __init__(self, config: ConfigHelper) -> None:
|
||||||
|
|
Loading…
Reference in New Issue