ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf_parser.y
(Generate patch)

Comparing ircd-hybrid-8/src/conf_parser.y (file contents):
Revision 1526 by michael, Mon Sep 10 18:06:06 2012 UTC vs.
Revision 1542 by michael, Sat Sep 29 20:31:35 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines