auth_on_register username/password are "undefined" #5
Comments
Hi Henning, I also had same question and I decided to not handle unknown clients. I only handle recognizable clients. Otherwise I return false. Erlio encourages you to pass the handler to the next handler in the chain if you don't recognize the client:
From here |
@georgepoenaru |
I guess the proper solution would pass an empty string as the username and nil if no username is set. Afaict this is how it works for Erlang plugins. Have to check the situation for diversity. |
@baranga Fair enough. I'm in control of all clients and I handled there. I guess is just a matter of how lua wrapper handle the Peer object in diversity. |
We just merged a fix for this. Instead of a string with value "undefined", |
Username/password parameter in
auth_on_register
hook are strings with value "undefined" if connecting client doesn't send username/password.How can I distinguish between client send nothing and client really send "undefined" as username/password? Maybe a empty username/password should be represented by
nil
orfalse
.The text was updated successfully, but these errors were encountered: