Requests on a registered stream skip authentication, so restrict that to
genuine continuations of the authorized request that opened the stream:
- A continuation may differ from the opening request only in its data,
so it can no longer, for example, supply a different cmdline to run.
- Streams are bound to the socket peer or window that opened them, and
only requests from that origin can continue or cancel them.
- Streams are aborted, discarding any buffered data, when the peer
disconnects, the window is closed or the request is cancelled, so
abandoned streams no longer stay authorized.
Cancellations of async requests are allowed without authentication, and
requests on a registered stream are allowed without authentication too.
handle_cmd() registered the stream before returning for a cancellation, so
an unauthenticated cancellation could register a stream id that a later
request then used to skip authentication. Register the stream only after
cancellations have returned.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop the abs() that silently flipped negative operands, reject non-finite
values and zero with an operator (which would otherwise reset the font
size). Validate in response_from_kitty too, so payloads sent by kitten @
get the same checks. Share the operator parsing with change_font_size.
Recognize all documented relative operators in the Python remote-control
parser and parse their numeric operand separately. Add regression coverage
for mapping dispatch with and without --all, and a changelog entry.
Include the action definition in the error and avoid the quoted repr
that str() produces for KeyError. Use a spec'd Mock in the tests so
unexpected Boss attribute access fails, and reference the PR in the
changelog.
An empty only_window_ids meant every window was selectable, so for example
select-window --exclude-active in a single window tab returned the active
window. Use None to mean unrestricted instead.
Closes#10683
Apply the --exclude-active filter in RemoteCommand.windows_for_payload so
every command using it honors the flag, instead of each command filtering
by hand. Extend the send-key test to cover --match, --match-tab and the
default active window fallback.
Exclude the active window before dispatching keys when requested. Add a
regression covering both values of the option with distinct active and
invoking windows, and update the changelog.
- Back off on all accept() errors that leave the connection pending, not
just resource exhaustion, so the talk thread cannot spin on a readable
listener
- Use an atomic for the test only accept failure injection instead of
taking the talk mutex on every accept
- Encrypt disk cache entries in chunks of up to 1MB to reduce the number
of write syscalls for large images
- Have GlobalWatchers.set_extra() invalidate the cached watchers