Files
plane/apps
Manish Gupta 47ab37cade [SECUR-236] fix: harden pagination bounds and auth brute-force rate limiting
AppScan DAST remediation, ported from the plane-ee fix (#8591) and
re-verified against a live plane-ce instance.

- paginator: reject non-positive per_page (per_page=0 -> ZeroDivisionError ->
  HTTP 500) and bound the client-supplied cursor value/offset. The grouped
  paginators use cursor.value as the per-group page size: a negative value
  slices the queryset with a negative stop (ValueError -> HTTP 500) and a huge
  value fetches far more than max_per_page rows per group (cap bypass / DoS).
  One central guard in BasePaginator.paginate(); regression tests added.
- auth: sign-in/sign-up (app + space) were plain Views with no rate limiting.
  Add the IP-based AuthenticationThrottle check plus a per-account throttle
  keyed on the normalized email (AuthenticationAccountThrottle). The IP key is
  bypassable by spoofing X-Forwarded-For (NUM_PROXIES unset); the per-account
  limiter caps credential guessing against a single account regardless of IP.
- project serializer: mark created_by/updated_by read-only (fields="__all__"
  left them client-writable, allowing project ownership/attribution forgery).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 14:49:12 +05:30
..