khlieng / dispatch

Web-based IRC client in Go.
https://dispatch.khlieng.com
MIT License
642 stars 30 forks source link

server password incorrect #73

Closed ghost closed 2 years ago

ghost commented 3 years ago

Hi. I'm getting the following error when setting a global password on the IRC server and setting that same password in the config.toml file. I've played with this quite a bit and am either missing some simple or there is a bug. It seems when the password var is set in the config, it auto-populates the password field in the form. But it never works. If I manual type the same password in the field, it does then let me in.

Jan 10 07:37:33 devchat ngircd[14959]: Client "stnkhenry" unregistered (connection 9): Bad server password.

# ./dispatch -v
v0.7
Commit: 08ffc79
Build Date: 08 May 2020, 01:01:00
Runtime: go1.14.2

I'll try to build this myself instead of using the what was linked in the README.md.

khlieng commented 3 years ago

It only sends the default password if the host you are trying to connect to matches the default host in the config, to prevent leaking the password.

ghost commented 3 years ago

Specifically you mean in the [defaults] section, the host= setting? I currently have it set to 127.0.0.1 which is clearly not the name of the IRC server which happens to be running there. I will test this. Thank you.

ghost commented 3 years ago

I did some /etc/hosts hackery to get this to working. On initial connect now, it does say Not enough parameters, but everthing seems to work. It looks to be the server generating this, so I'll look there for answer. Thanks for the help.

daftaupe commented 2 years ago

@thalios1973 if you have more details to give regarding this issue, it would be interesting as some more documentation could go in the Wiki regarding this setting.

ghost commented 2 years ago

All I did is set the host setting under [defaults] in config.toml to the name of the server (that I want it to be called) (e.g. myirc.doma.in) and then add that hostname to the 127.0.0.1 line in /etc/host.

127.0.0.1              localhost myirc.doma.in
daftaupe commented 2 years ago

Thanks for the details @thalios1973.

Maybe this ticket can be closed now ?

ghost commented 2 years ago

Absolutely.