We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4926 - X11: does not work for untrusted clients
Summary: X11: does not work for untrusted clients
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.10
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-04 13:03 UTC by Dmitry Levin
Modified: 2020-01-04 19:06 UTC (History)
0 users

See Also:


Attachments
SDL2-2.0.10-alt-X11_InitKeyboard.patch (1.77 KB, message/rfc822)
2020-01-04 13:03 UTC, Dmitry Levin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Levin 2020-01-04 13:03:15 UTC
Created attachment 4150 [details]
SDL2-2.0.10-alt-X11_InitKeyboard.patch

X11_InitKeyboard invokes XAutoRepeatOn unconditionally, but, unfortunately, this does not work for untrusted X11 clients, e.g. in case of untrusted X11 forwarding.

The fix is to avoid XAutoRepeatOn invocation when global_auto_repeat is already equal to AutoRepeatModeOn (which is the default).
Proposed patch is attached.
Comment 1 Sam Lantinga 2020-01-04 19:06:42 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/f350dadd5ad1

FYI, that member initialization syntax doesn't work with all supported compilers.