summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-16 18:49:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-16 18:49:48 +0000
commit55fdc886a1a7941ef1d0162ac73cbf368cd66151 (patch)
treedb7daa63d4015892fa48e41f1648ff29faeb664e
parentbba10a7af4df8f943152607ded0c3d45460b1d73 (diff)
Checking to prevent dodgy opertypes (opertypes must follow the same syntax as nicks now)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3229 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cmd_oper.cpp7
-rw-r--r--src/modules/m_spanningtree.cpp4
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");