Disallow spiders to access the auth actions
authorAlexander Ebert <ebert@woltlab.com>
Fri, 16 Aug 2019 12:57:53 +0000 (14:57 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 16 Aug 2019 12:57:53 +0000 (14:57 +0200)
wcfsetup/install/files/lib/action/FacebookAuthAction.class.php
wcfsetup/install/files/lib/action/GithubAuthAction.class.php
wcfsetup/install/files/lib/action/GoogleAuthAction.class.php
wcfsetup/install/files/lib/action/TwitterAuthAction.class.php

index 1c0bd77f725a0dc77422d86f60c36b6d1edd0c0f..b5f4548f358c3512afc896a7d6177d4dd3940c97 100644 (file)
@@ -27,6 +27,17 @@ class FacebookAuthAction extends AbstractAction {
         */
        public $neededModules = ['FACEBOOK_PUBLIC_KEY', 'FACEBOOK_PRIVATE_KEY'];
        
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               if (WCF::getSession()->spiderID) {
+                       throw new IllegalLinkException();
+               }
+       }
+       
        /**
         * @inheritDoc
         */
index 355e42b75418d064f8b04e3d0609e4e63320f5b6..fb6b9524549ef532dbcbdd3e30459e88a54c54fc 100644 (file)
@@ -27,6 +27,17 @@ class GithubAuthAction extends AbstractAction {
         */
        public $neededModules = ['GITHUB_PUBLIC_KEY', 'GITHUB_PRIVATE_KEY'];
        
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               if (WCF::getSession()->spiderID) {
+                       throw new IllegalLinkException();
+               }
+       }
+       
        /**
         * @inheritDoc
         */
index 312524a9996cea2770de2b6923ea48b04ddd7d13..8211988ed49e386758e69c9d6da2a3aad92a6445 100644 (file)
@@ -27,6 +27,17 @@ class GoogleAuthAction extends AbstractAction {
         */
        public $neededModules = ['GOOGLE_PUBLIC_KEY', 'GOOGLE_PRIVATE_KEY'];
        
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               if (WCF::getSession()->spiderID) {
+                       throw new IllegalLinkException();
+               }
+       }
+       
        /**
         * @inheritDoc
         */
index 4edce144f6c92327387dcc354f3873c0f6dfd72d..eeaa9da04aa64793dc3665b5c76ab218f4a39918 100644 (file)
@@ -26,6 +26,17 @@ class TwitterAuthAction extends AbstractAction {
         */
        public $neededModules = ['TWITTER_PUBLIC_KEY', 'TWITTER_PRIVATE_KEY'];
        
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               if (WCF::getSession()->spiderID) {
+                       throw new IllegalLinkException();
+               }
+       }
+       
        /**
         * @inheritDoc
         */