Huge integer on views pager LIMIT causes mysql error

Created on 12 September 2019, over 5 years ago
Updated 29 January 2023, about 2 years ago

Problem/Motivation

When tampering with the page parameter for a view and setting it to a huge size, a mysql error occurs:

Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-6446744073709551616' at line 3: SELECT ...

e.g. http://example.com/myview?page=1e18

Proposed resolution

Add an integer limit on the LIMIT parameter.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated 1 day ago

Created by

πŸ‡§πŸ‡ͺBelgium mpp

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024