x11 icon indicating copy to clipboard operation
x11 copied to clipboard

Xauthority file parsed incorrectly

Open Meep3692 opened this issue 9 months ago • 2 comments

https://github.com/moaxcp/x11/blob/4bf8a593b104395ca3ef602dabcc23bcd36377a6/x11-protocol/x11-protocol-core/src/main/java/com/github/moaxcp/x11/protocol/XAuthority.java#L101

The current implementation reads the display number as a UTF-8 string but it should read it as a length-prefixed ASCII string. It should be noted that on my system, the length of this string is 0 for some reason. I can't find any information on what to use in this case, but I think just using 0 should be fine.

Reference: https://gitlab.freedesktop.org/xorg/lib/libxau/-/tree/master?ref_type=heads (The file format is described in the readme near the bottom)

Meep3692 avatar May 11 '24 07:05 Meep3692

Thanks for the reference! I don't think I have seen it. I will look into it and use 0 if the length is 0.

Edit: right now I am splitting the project into modules and upgrading to jdk 21. I will merge it when I find time.

moaxcp avatar May 15 '24 15:05 moaxcp

This should be fixed in 0.18.2.

moaxcp avatar Jul 31 '24 16:07 moaxcp