diff options
author | Adam <Adam@anope.org> | 2012-02-25 15:10:52 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-02-25 15:10:52 -0500 |
commit | 07fffb0b905cbf8e09d2235162ff3680cac12a2d (patch) | |
tree | 7b964c1abfba3aeb0d6aaf6698c1fdd0d52f819a | |
parent | 1d3ca36768a013e1a28a1e3db1b4ad9f47fc2157 (diff) |
Bug #1380 - Do not allow akill masks to end in @.
This can be used to cause the IRCd to SQUIT us by
adding invalid akills. The only known affected is
Charybdis.
Also fixed a crash caused by receiving a SQUIT for ourselves.
-rw-r--r-- | Changes | 4 | ||||
-rw-r--r-- | src/operserv.c | 8 | ||||
-rw-r--r-- | src/protocol/charybdis.c | 3 | ||||
-rw-r--r-- | src/servers.c | 2 | ||||
-rw-r--r-- | version.log | 3 |
5 files changed, 16 insertions, 4 deletions
@@ -1,8 +1,8 @@ Anope Version 1.8 - GIT ----------------------- -02/22 F Fixed several grammar errors in docs/ (patch provided by Simba) [ #00] 12/31 F Fixed os_svsnick to allow changing the case of a users' nick [#1369] - +02/22 F Fixed several grammar errors in docs/ (patch provided by Simba) [ #00] +02/25 F Do not allow akill masks to end in @ [#1380] Anope Version 1.8.7 ----------------------- diff --git a/src/operserv.c b/src/operserv.c index 6e2e7ce33..74a2377dc 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -809,6 +809,14 @@ int add_akill(User * u, char *mask, const char *by, const time_t expires, *host = 0; host++; + if (!*host) + { + if (u) + notice_lang(s_OperServ, u, BAD_USERHOST_MASK); + free(mask2); + return -1; + } + entry = scalloc(sizeof(Akill), 1); if (!entry) { diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c index ad6256d29..6a4399be0 100644 --- a/src/protocol/charybdis.c +++ b/src/protocol/charybdis.c @@ -873,6 +873,9 @@ void charybdis_cmd_remove_akill(char *user, char *host) { Uid *ud; + if (!user || !*user || !host || !*host) + return; + ud = find_uid(s_OperServ); send_cmd((UseTS6 ? (ud ? ud->uid : s_OperServ) : s_OperServ), "UNKLINE * %s %s", user, host); diff --git a/src/servers.c b/src/servers.c index 282409bea..efe039a24 100644 --- a/src/servers.c +++ b/src/servers.c @@ -243,7 +243,7 @@ static void delete_server(Server * serv, const char *quitreason) serv->prev->next = serv->next; if (serv->next) serv->next->prev = serv->prev; - if (serv->uplink->links == serv) + if (serv->uplink && serv->uplink->links == serv) serv->uplink->links = serv->next; if (debug) diff --git a/version.log b/version.log index 487695b3f..1afd81821 100644 --- a/version.log +++ b/version.log @@ -8,9 +8,10 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="8" VERSION_EXTRA="-git" -VERSION_BUILD="3093" +VERSION_BUILD="3094" # Changes since 1.8.7 Release +#Revision 3094 - Bug #1380 - Do not allow akill masks to end in @ #Revision 3093 - Fixed several grammar errors in docs/ (patch provided by Simba) #Revision 3092 - Updated Copyright to 2012 #Revision 3091 - Bug #1369 - Fixed os_svsnick to allow changing the case of a users' nick |