diff options
-rw-r--r-- | src/cmd_oper.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd_oper.cpp b/src/cmd_oper.cpp index 8e57329d4..15e0df3c4 100644 --- a/src/cmd_oper.cpp +++ b/src/cmd_oper.cpp @@ -110,6 +110,13 @@ void cmd_oper::Handle (char **parameters, int pcnt, userrec *user) Config->ConfValue("type","host",j,HostName,&Config->config_f); if (*HostName) ChangeDisplayedHost(user,HostName); + if (!isnick(TypeName)) + { + WriteServ(user->fd,"491 %s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick); + WriteOpers("*** CONFIGURATION ERROR! Oper type invalid for OperType '%s'",OperType); + log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host); + return; + } strlcpy(user->oper,TypeName,NICKMAX); found = true; fail2 = false; diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index c10798281..e91158666 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1399,7 +1399,6 @@ class TreeSocket : public InspSocket log(DEBUG,"OUT: %s",line.c_str()); if (this->ctx_out) { - log(DEBUG,"AES context"); char result[10240]; char result64[10240]; if (this->keylength) @@ -1411,12 +1410,9 @@ class TreeSocket : public InspSocket } } unsigned int ll = line.length(); - log(DEBUG,"Plaintext line with padding = %d chars",ll); ctx_out->Encrypt(line.c_str(), result, ll, 1); - log(DEBUG,"Encrypted."); to64frombits((unsigned char*)result64,(unsigned char*)result,ll); line = result64; - log(DEBUG,"Encrypted: %s",line.c_str()); //int from64tobits(char *out, const char *in, int maxlen); } return this->Write(line + "\r\n"); |