]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix IPv6 cloaking in compatability mode (was using the wrong xtab confusor)
authorDaniel De Graaf <danieldg@inspircd.org>
Sat, 24 Apr 2010 19:20:21 +0000 (14:20 -0500)
committerDaniel De Graaf <danieldg@inspircd.org>
Sat, 24 Apr 2010 19:20:21 +0000 (14:20 -0500)
src/modules/m_cloaking.cpp

index 03ea90fbda0e020e17353fb4346c6d30cd98eff9..a8a553dbee76ffa51ac57810d8f3ef476f918c3c 100644 (file)
@@ -247,14 +247,14 @@ class ModuleCloaking : public Module
                        item += *input;
                        if (item.length() > 7)
                        {
-                               hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[1]+rounds) % 4], item).substr(0,8));
+                               hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[0]+rounds) % 4], item).substr(0,8));
                                item.clear();
                        }
                        rounds++;
                }
                if (!item.empty())
                {
-                       hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[1]+rounds) % 4], item).substr(0,8));
+                       hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[0]+rounds) % 4], item).substr(0,8));
                }
                /* Stick them all together */
                return irc::stringjoiner(":", hashies, 0, hashies.size() - 1).GetJoined();