[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
AnyIO version
4.4.0
Python version
3.10
What happened?
On anyio version 3.7 at least it's possible to pass a path starting with a null byte to anyio.create_unix_listener to create an abstract unix domain socket that isn't backed by a real file and is cleaned up automatically on program close.
In version 4.4.0 (at least probably earlier) this gives a ValueError: embedded null byte when the code tries to call os.stat on the path.
I havn't tested on trio backend or more versions but may do so later.
Assuming this is something that is desired to fix I may try creating a PR for it as well.
Things to check first
[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
AnyIO version
4.4.0
Python version
3.10
What happened?
On anyio version 3.7 at least it's possible to pass a path starting with a null byte to
anyio.create_unix_listener
to create an abstract unix domain socket that isn't backed by a real file and is cleaned up automatically on program close.In version 4.4.0 (at least probably earlier) this gives a
ValueError: embedded null byte
when the code tries to callos.stat
on the path.How can we reproduce the bug?
I havn't tested on trio backend or more versions but may do so later. Assuming this is something that is desired to fix I may try creating a PR for it as well.