pagy icon indicating copy to clipboard operation
pagy copied to clipboard

Bug: Regression of empty page param handling

Open thedanbob opened this issue 9 months ago • 3 comments

👀 Before submitting...

  • [x] I upgraded to pagy version 9.3.4
  • [x] I searched through the Documentation
  • [x] I searched through the Issues
  • [x] I searched through the Q&A
  • [x] I asked Pagy Trained AI - Warning - The information may not be 100% accurate, but it serves as a good starting point for further investigation.

🧐 REQUIREMENTS

  • [x] I am providing a VALID code file that confirms the bug
  • [x] I am NOT posting any of the USELESS THINGS listed above
  • [x] I am aware that this issue will be automatically closed if the code file is missing or INVALID

💬 Description

Pagy 9.0.3 introduced a regression of this issue. The bug is still present in 9.3.4.

How to reproduce:

  1. Run the 9.0.2 repro app and visit http://localhost:8000/?page=
  2. Run the 9.0.3 (or higher) repro app and visit the same page

thedanbob avatar Mar 10 '25 20:03 thedanbob

Yup! It still need to be fixed in v10, which BTW avoids creating URLs with empty params, however apps may do that by mistake, and I have to think about what to do in that case.

ddnexus avatar Mar 14 '25 00:03 ddnexus

v10, which BTW avoids creating URLs with empty params

Ah, good to know. I did see one case of a legitimate URL constructed by the app with page= but I couldn't figure out how it happened. But most of the crashes I'm seeing are from bots/scripts trying nonsense URLs.

thedanbob avatar Mar 14 '25 11:03 thedanbob

Yes. Fixed in 10, it will be back ported ASAP.

ddnexus avatar Mar 14 '25 11:03 ddnexus

Fixed in 43.0.0

ddnexus avatar Aug 10 '25 07:08 ddnexus