With its config file unreadable, Weylus runs with no access code and says nothing
What happened
On Windows 11 we ran Weylus master (38a01a8, built by CI) from a Task Scheduler task at logon, with --no-gui, and put the access code in %APPDATA%\weylus\weylus.toml instead of on the command line.
From inside the task, that file was not visible to the process. Test-Path on the same path returned False inside the task and True in an interactive shell; we don't know why. Weylus started normally and accepted clients with no access code at all, so a wrong code got in. Nothing in the log said the config could not be read or that no access code was set.
We caught it in our own test within about a minute (the server was bound to a private address only) and went back to --access-code.
Why it matters
When a config file is missing or unreadable, Weylus quietly runs open, and the user believes it is protected. On a machine whose bind address is reachable from other devices, that gives full remote input to anyone on the network.
Suggestions (any one would have caught it)
- Log a warning at startup when no access code is set, especially when the bind address is not loopback.
- Log an error when a config file exists but cannot be read, or when the config directory resolves somewhere unexpected.
- Optionally, require an explicit flag (for example
--no-access-code) to run without one on a non-loopback address.
Environment
Windows 11, Weylus master 38a01a8, started through Task Scheduler (cmd /c -> PowerShell -> weylus.exe --no-gui --bind-address <private ip> --web-port 1701).
Generated with Claude Code
Source: H-M-H/Weylus