Skip to content

Harden explorer DnD against null drop targets, fixes #7933 - #7934

Merged
hansva merged 2 commits into
apache:mainfrom
mattcasters:issue-7933
Aug 13, 2026
Merged

Harden explorer DnD against null drop targets, fixes #7933#7934
hansva merged 2 commits into
apache:mainfrom
mattcasters:issue-7933

Conversation

@mattcasters

Copy link
Copy Markdown
Contributor

Summary

  • Guard ExplorerPerspective tree drop/drag-over handlers so a null RAP drop target (event.item == null) or invalid payload cannot NPE.
  • Reject invalid drops with DROP_NONE, only accept folder targets, null-safe parent checks, and wrap the drop path so unexpected errors show a dialog instead of killing the Hop Web session.

Fixes #7933

Test plan

  • In Hop Web, drag a file in the explorer tree and drop on empty tree area (between/outside items) — session stays alive, drop is ignored
  • Drop a file onto a folder — copy/move still works
  • Drop a file onto another file — drop rejected
  • Desktop Hop GUI: same drag/drop behaviors still work

Guard ExplorerPerspective drop/dragOver so a null RAP drop target
or bad payload cannot NPE and kill the Hop Web session.
SessionResult treated channel-closed + available()==0 as EOF too early,
which can drop late stdout packets on busy GitHub runners. Drain with a
short post-close grace when empty, and run the embedded SSHD command
handler asynchronously so onExit is not racy with the JSch client.
@hansva
hansva merged commit b9929f4 into apache:main Aug 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Hop Web throws exception

2 participants