Skip to content

fix: encode task pagination filters#485

Merged
utksh1 merged 2 commits into
utksh1:mainfrom
saurabhhhcodes:fix/task-pagination-urlencode-466
Jun 4, 2026
Merged

fix: encode task pagination filters#485
utksh1 merged 2 commits into
utksh1:mainfrom
saurabhhhcodes:fix/task-pagination-urlencode-466

Conversation

@saurabhhhcodes
Copy link
Copy Markdown
Contributor

Summary

  • Replace manual task pagination query-string concatenation with urllib.parse.urlencode.
  • Preserve existing pagination response fields and filter behavior.
  • Add a regression test for filtered next links containing spaces, slashes, and ampersands.

Closes #466

Tests

  • PYTHONPYCACHEPREFIX=/private/tmp/secuscan-pycache python3 -m py_compile backend/secuscan/routes.py testing/backend/test_task_pagination.py
  • git diff --check
  • PYTHONPATH=/private/tmp/secuscan-stubs: /private/tmp/secuscan-466/venv311/bin/python -m pytest testing/backend/test_task_pagination.py -q

Note: the full backend requirements install was blocked locally by pycairo needing system cairo/pkg-config through the PDF reporting dependency; the focused pagination suite was run with a temporary local xhtml2pdf import stub because this route test does not exercise PDF generation.

@saurabhhhcodes
Copy link
Copy Markdown
Contributor Author

CI is green on this PR now. Current passing checks: artifact-check, detect-changes, formatting-hygiene, backend-lint, frontend-checks, backend-tests, and benchmark.\n\nThe change is scoped to #466: URL-encoding task pagination links when filters are present. Could you please review when available, and apply/inherit the issue scoring labels on the PR if this is accepted for GSSoC scoring?

@utksh1 utksh1 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label type:testing Testing work category bonus label area:backend Backend API, database, or service work gssoc:approved Admin validation: approved for GSSoC scoring labels Jun 4, 2026
Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Pagination links now use structured URL encoding and include focused coverage for encoded filter values. CI is passing.

@utksh1 utksh1 merged commit 6f1be63 into utksh1:main Jun 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BACKEND] URL-encode task pagination links when filters are present

2 participants