]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't add the user's domain to invitee domains unless it's on the whitelist
authorZach Copley <zach@status.net>
Wed, 11 May 2011 23:19:51 +0000 (16:19 -0700)
committerZach Copley <zach@status.net>
Wed, 11 May 2011 23:19:51 +0000 (16:19 -0700)
plugins/DomainWhitelist/DomainWhitelistPlugin.php

index 9e1b31ef34a3445afc7e724ce75c2fb0829e6ef5..cf0d94884d1c954c9c6a5ec0fc59658f65766421 100644 (file)
@@ -231,8 +231,9 @@ class DomainWhitelistPlugin extends Plugin
                 )
             );
 
-            array_unshift($orderedWhitelist, $userDomain);
-
+            if (in_array($userDomain, $whitelist)) {
+                array_unshift($orderedWhitelist, $userDomain);
+            }
             return $orderedWhitelist;
         }