fedora-infra / fas

Fedora Account System
https://admin.fedoraproject.org/accounts
GNU General Public License v2.0
40 stars 50 forks source link

return a 400 if page 0 or a negative page is requested #234

Closed ryanlerch closed 7 years ago

ryanlerch commented 7 years ago

Previously it was possible with the pagination URLs on the people and groups lists to request page 0 or a negative page, for example:

https://admin.stg.fedoraproject.org/fas3/groups/page/-4 https://admin.stg.fedoraproject.org/fas3/people/page/0

this change detects if a page under 1 is requested on the groups list and the users list, and returns the 400 error as was previously done if the number of pages exceeded the available number of pages.

pypingou commented 7 years ago

👍 for me

laxathom commented 7 years ago

:+1: from me