Commit Diff
- Commit:
5417a72536954927371d597e9a4e0453e70620e3
- From:
- Florian Westphal <fw@strlen.de>
- Date:
- Message:
- channel: always reject zero-length channel key previously, any client could join in this configuration: [Channel] Name = #test Modes = tnk KeyFile = /tmp/foobar fix this by checking for zero-length key before comparing key to channel key.
- Actions:
- Patch | Tree
--- src/ngircd/channel.c +++ src/ngircd/channel.c @@ -1081,11 +1081,11 @@ Channel_CheckKey(CHANNEL *Chan, CLIENT *Client, const assert(Key != NULL); if (!strchr(Chan->modes, 'k')) - return true; - if (strcmp(Chan->key, Key) == 0) return true; if (*Key == '\0') return false; + if (strcmp(Chan->key, Key) == 0) + return true; file_name = array_start(&Chan->keyfile); if (!file_name)