Validate the `pageNo` in LikeAction::validateGetGroupedUserList()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Mar 2022 12:45:45 +0000 (13:45 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Mar 2022 12:45:45 +0000 (13:45 +0100)
wcfsetup/install/files/lib/data/like/LikeAction.class.php

index 0326922d0cfc812814df4929278afce6dd6de86b..51e5597543ac369873d881f0ff66ad2dfdfaa03d 100644 (file)
@@ -222,6 +222,10 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
                $this->validateObjectParameters();
                
                $this->readInteger('pageNo');
+
+               if ($this->parameters['pageNo'] < 1) {
+                       throw new UserInputException('pageNo');
+               }
        }
        
        /**