libsdl-org / SDL-1.2

Simple Directmedia Layer, 1.2 branch ... ***DEPRECATED***, please use https://github.com/libsdl-org/SDL for new projects!
https://libsdl.org
GNU Lesser General Public License v2.1
98 stars 81 forks source link

Fixed: Security popup when enumerating HID devices; #860

Closed de4me closed 2 years ago

de4me commented 2 years ago

Get device information before opening and skip protected devices.

Fixes #826

sezero commented 2 years ago

Isn't #826 about keyboard handling?

@icculus, @slouken: Please review?

de4me commented 2 years ago

Isn't #826 about keyboard handling?

Yes, message appear when you try open keyboard and mouse when enumerate HID devices.

icculus commented 2 years ago

Yeah, the warning is because macOS doesn't know if you plan to sniff passwords with raw keyboard access, so if the joystick code skips keyboards, it'll presumably fix the issue.

I've only glanced at this patch, but it looks reasonable to apply.

sezero commented 2 years ago

Patch is in, thanks!