Include the reserved file check in the `can_access_path()` method. This
fixes a potential vulnerability in the notifier where it may be possible
to attach a reserved file to a notification.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Provides an API for front ends to archive a list of files and/or
folders into a single zipped file.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Move logger initialization out of the utils module into its own
module, loghelper.py. This manager class simplifies access to the
underlying logger implementation and the queue listener. Additionally
it allows for endpoint registration.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
On systems where Klipper is installed as a service allow a
manual log rollover. The rollover cannot be called while printing.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Several components throughout Moonraker determine whether or not
Klipper is printing or is ready before taking action. This centralizes
queries in one area. The checks do not query Klipper directly but
rather rely on subscriptions to push state to Moonraker.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This change allows the user to choose the strategy for publishing
klipper states to MQTT. The original strategy where all state
updates are published to a common topic is still the default, but
can be turned off using the "publish_combined_status" config option.
The newly added strategy is publishing individual state updates to
separate mqtt topics. It is disabled by default, and can be enabled
with the "publish_split_status" config option.
Signed-off-by: Matt White <m.w.white@gmail.com>
Wrap all callbacks in a coroutine that handles exceptions. This
should eliminate "task not retreived" errors.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The "force" argument may be used turn on a device during a print
that is otherwise locked for normal requests.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
While the [update_manager client ...] naming convention is
deprecated it should not be disallowed. This fixes service restart
issues using the old naming convention.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Support unix connections with full access to all JSON-RPC APIs.
Internally these connections are treated as websocket connections,
however the underlying transport protocol is simplfied. Packets
are JSON encoded objects terminated with an ETX character.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Separate out code that applies to both standard websockets and the
future unix socket implementation.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>