diff options
| author | Florian Westphal <fw@strlen.de> | 2005-09-02 13:58:52 +0000 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2005-09-02 13:58:52 +0000 |
| commit | dd3d2e2c3947d903cb41491ea8280e6867db5d45 (patch) | |
| tree | bbf17c6eda4483403f46d08bde078ab06423f4d9 /src | |
| parent | 9275dc4dc4d81753babb56487357078366eeeced (diff) | |
| download | ngircd-dd3d2e2c3947d903cb41491ea8280e6867db5d45.tar.gz ngircd-dd3d2e2c3947d903cb41491ea8280e6867db5d45.zip | |
Complain if MyPassword starts with ':'. (Reported by Ben Korvemaker)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/conf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index 81735706..d2bac16c 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: conf.c,v 1.84 2005/09/02 13:50:52 fw Exp $"; +static char UNUSED id[] = "$Id: conf.c,v 1.85 2005/09/02 13:58:52 fw Exp $"; #include "imp.h" #include <assert.h> @@ -910,6 +910,11 @@ Handle_SERVER( int Line, char *Var, char *Arg ) } if( strcasecmp( Var, "MyPassword" ) == 0 ) { /* Password of this server which is sent to the peer */ + if (*Arg == ':') { + Config_Error(LOG_ERR, + "%s, line %d (section \"Server\"): MyPassword must not start with ':'!", + NGIRCd_ConfFile, Line); + } len = strlcpy( New_Server.pwd_in, Arg, sizeof( New_Server.pwd_in )); if (len >= sizeof( New_Server.pwd_in )) Config_Error_TooLong( Line, Var ); |