/[svn]/ircd-hybrid-8/src/conf_parser.y
ViewVC logotype

Diff of /ircd-hybrid-8/src/conf_parser.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1541 by michael, Mon Sep 10 18:06:06 2012 UTC revision 1542 by michael, Sat Sep 29 20:31:35 2012 UTC
# Line 1711  auth_flags_item: SPOOF_NOTICE Line 1711  auth_flags_item: SPOOF_NOTICE
1711      yy_aconf->flags |= CONF_FLAGS_NEED_PASSWORD;      yy_aconf->flags |= CONF_FLAGS_NEED_PASSWORD;
1712  };  };
1713    
 /* XXX - need check for illegal hostnames here */  
1714  auth_spoof: SPOOF '=' QSTRING ';'  auth_spoof: SPOOF '=' QSTRING ';'
1715  {  {
1716    if (conf_parser_ctx.pass == 2)    if (conf_parser_ctx.pass == 2)
1717    {    {
1718      MyFree(yy_conf->name);      MyFree(yy_conf->name);
1719    
1720      if (strlen(yylval.string) < HOSTLEN)      if (strlen(yylval.string) <= HOSTLEN && valid_hostname(yylval.string))
1721      {          {    
1722        DupString(yy_conf->name, yylval.string);        DupString(yy_conf->name, yylval.string);
1723        yy_aconf->flags |= CONF_FLAGS_SPOOF_IP;        yy_aconf->flags |= CONF_FLAGS_SPOOF_IP;
1724      }      }
1725      else      else
1726      {      {
1727        ilog(LOG_TYPE_IRCD, "Spoofs must be less than %d..ignoring it", HOSTLEN);        ilog(LOG_TYPE_IRCD, "Spoof either is too long or contains invalid characters. Ignoring it.");
1728        yy_conf->name = NULL;        yy_conf->name = NULL;
1729      }      }
1730    }    }

Legend:
Removed from v.1541  
changed lines
  Added in v.1542

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28