Skip to content

Security: Harden order_by parameter sanitization - #2348

Merged
NoumaanAhamed merged 1 commit into
developfrom
fix/sqli-order-by-allowlist-bypass
Jul 20, 2026
Merged

Security: Harden order_by parameter sanitization#2348
NoumaanAhamed merged 1 commit into
developfrom
fix/sqli-order-by-allowlist-bypass

Conversation

@NoumaanAhamed

Copy link
Copy Markdown
Collaborator

Summary

Strengthens input sanitization for the order_by parameter in
RTMediaModel::get() to ensure only validated values are used
in query construction.

Changes

  • Reconstruct order_by from individually validated tokens
    rather than passing through the original input string
  • Use strict comparison for allowlist checks

Testing

  • Verified gallery queries work correctly with default and
    allowed order_by values
image

Copilot AI review requested due to automatic review settings July 20, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 20, 2026 11:08
@NoumaanAhamed
NoumaanAhamed force-pushed the fix/sqli-order-by-allowlist-bypass branch from 656e1f1 to c500433 Compare July 20, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rtBot

rtBot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Unable to PHPCS or SVG scan one or more files due to error running PHPCS/SVG scanner:

  • app/helper/RTMediaModel.php

The error may be temporary. If the error persists, please contact a human (commit-ID: c500433).

@NoumaanAhamed
NoumaanAhamed merged commit 940ba93 into develop Jul 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants