Added check for infinite loop
authorAlexander Ebert <ebert@woltlab.com>
Thu, 6 Dec 2012 14:32:09 +0000 (15:32 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 6 Dec 2012 14:32:09 +0000 (15:32 +0100)
wcfsetup/install/files/lib/data/application/ApplicationAction.class.php

index edd72ec7122d9302b2f5955ea79f23b4a9db3e8e..98c089d4219ab6e7c95d2fbf84dfe07310daae38 100644 (file)
@@ -31,10 +31,17 @@ class ApplicationAction extends AbstractDatabaseObjectAction {
         */
        public $applicationEditor = null;
        
+       protected static $i = 0;
+       
        /**
         * Assigns a list of applications to a group and computes cookie domain and path.
         */
        public function rebuild() {
+               self::$i++;
+               if (self::$i > 10) {
+                       throw new \wcf\system\exception\SystemException("Infinite loop");
+               }
+               
                if (empty($this->objects)) {
                        $this->readObjects();
                }