Re: [dev] [slock] Doesn't work when password contains non-ASCII characters

From: Laslo Hunhold <dev_AT_frign.de>
Date: Sun, 9 Jan 2022 10:13:44 +0100

On Sun, 9 Jan 2022 09:45:49 +0100
meator <meator.dev_AT_gmail.com> wrote:

Dear meator,

> Slock doesn't work when the user's password contains non-ASCII
> characters. I have discussed this in the IRC channel, because I had
> problems with 'ů'.
>
> Please fix this or document the fact that slock doesn't support
> non-ASCII passwords at https://tools.suckless.org/slock/.

nice find! I don't have time for that right now, but as a small
pointer, the culprit is found here[0], because slock uses
XLookupString which is locale dependent and more or less ignores any
non-ASCII-character in the default C-locale.

This is easy to fix by using XmbLookupString that dmenu uses[1]. Maybe
someone is interested in cooking up a patch, it shouldn't take too long
but requires care when testing! :)

With best regards

Laslo

[0]:https://git.suckless.org/slock/file/slock.c.html#l146
[1]:https://git.suckless.org/dmenu/file/dmenu.c.html#l308
Received on Sun Jan 09 2022 - 10:13:44 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 09 2022 - 10:24:08 CET