You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "brandonbloom (via GitHub)" <gi...@apache.org> on 2026/10/12 19:16:14 UTC

Re: [PR] GUACAMOLE-306: Guard against NULL client in VNC size handler [guacamole-server]

brandonbloom commented on PR #706:
URL: https://github.com/apache/guacamole-server/pull/706#issuecomment-6130957023

   Same crash here: guacd 1.6.0 against macOS Screen Sharing (Apple account authentication, RFB security type 30), with iOS Safari as the client. Focusing the credentials field opens the on-screen keyboard, the viewport shrinks, the client sends `size` while guacd is still waiting for credentials, and the connection dies about a second later. This looks like the same bug as [GUACAMOLE-2148](https://issues.apache.org/jira/browse/GUACAMOLE-2148) ("VNC password on iOS disconnect the client"), which may be a good JIRA issue to tag this PR with.
   
   A standalone reproduction (a stub VNC server that requires a password and then waits, plus a client speaking the Guacamole protocol directly to guacd on 4822, no webapp) is here: https://github.com/brandonbloom/guacamole-server/tree/vnc-size-before-connect/repro/vnc-size-before-connect. Stock `guacamole/guacd:1.6.0` drops the connection about 1.1 s after `size` on every run. With `--no-size`, or with `disable-display-resize=true`, it stays up.
   
   One alternative to consider: instead of returning early in `guac_vnc_display_set_size()`, guard `guac_vnc_user_size_handler()` the way GUACAMOLE-306 guarded the mouse and key handlers, and record the requested size as the owner's optimal size while `rfb_client` is still NULL. The initial resize after connecting already uses that, so the size requested during the prompt isn't lost: https://github.com/brandonbloom/guacamole-server/commit/da7a4e064da78dc019c511c7bc535bda5c8d4944 (11 lines in `src/protocols/vnc/input.c`). Verified with the reproduction above.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org