coder / code-server

VS Code in the browser
https://coder.com
MIT License
67.84k stars 5.57k forks source link

Some special characters in the password are not supported #7008

Open doncadavona opened 1 week ago

doncadavona commented 1 week ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Set the password as "supersecret^" in ~/.config/code-server/config.yaml
  2. Restart code-server by running sudo systemctl restart code-server@$USER
  3. Login in code-server web using the password supersecret^.
  4. Expect that the password is incorrect.

Expected

The password is expected to be correct.

Actual

The password is incorrect.

Logs

No response

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in GitHub Codespaces?

This cannot be tested in GitHub Codespaces

Are you accessing code-server over a secure context?

Notes

If this is not a bug, it would be nice to make the password requirements explicitly indicated in the docs.

code-asher commented 1 week ago

It seems to work for me. I tried secret^ in both the config.yaml and as an environment variable.

My config:

bind-addr: 127.0.0.1:8080
auth: password
password: secret^
cert: false
doncadavona commented 1 week ago

Hm, it's weird that it doesn't work on me. I will investigate further. Thanks for confirming it works on yours @code-asher .

code-asher commented 6 days ago

Definitely strange. If you check the browser dev tools and look at the network request body, do you see that the password you expect is being sent to the backend? Also, do you see messages on the code-server side about the password being rejected? You should see failed login attempt.

Maybe it is somehow not reading the right config.yaml although I am not sure how that would happen. Do other settings there work, like changing the log level or changing welcome-text (it will show on the login page)? One idea is to try passing --config to make sure it is definitely using the right file.