Conversation
Update sanitize_input regex patterns to accept spaces in addition to alphanumeric characters and hyphens. This allows user_group, campaign, category, and language code parameters to contain spaces for better flexibility in filtering options across status, missing_exists, and titles_infos endpoints.
|
Warning Review limit reached
More reviews will be available in 30 minutes and 11 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR removes the ChangesAPI surface and input parsing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request removes the exists_by_qids endpoint and its associated configurations across several files, while also updating input sanitization regexes to allow spaces in parameters like categories, campaigns, and user groups. The review feedback highlights that allowing spaces in language codes ($lang_code) unnecessarily weakens input validation, as language codes do not contain spaces. Additionally, a redundant fallback expression was identified in status.php that can be simplified to improve readability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/api_cod/status.php (1)
45-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant
$_GET['cat']fallback.
$category_rawalready resolves to$_GET['category'] ?? $_GET['cat'] ?? nullon line 43, so the extra?? $_GET['cat']here is unreachable. Match the cleaner form used inpages_query()(titles_infos.php line 102).♻️ Simplify
- $category = sanitize_input($category_raw ?? $_GET['cat'] ?? '', '/^[A-Za-z0-9- ]+$/'); + $category = sanitize_input($category_raw ?? '', '/^[A-Za-z0-9- ]+$/');🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/api_cod/status.php` around lines 45 - 46, The category sanitization in status.php has a redundant fallback because $category_raw already includes $_GET['cat']; update the sanitize_input call to use only $category_raw with the same fallback pattern as pages_query() in titles_infos.php, and keep the change localized around the $campaign and $category assignments so the logic stays consistent and cleaner.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/api_cod/status.php`:
- Around line 45-46: The category sanitization in status.php has a redundant
fallback because $category_raw already includes $_GET['cat']; update the
sanitize_input call to use only $category_raw with the same fallback pattern as
pages_query() in titles_infos.php, and keep the change localized around the
$campaign and $category assignments so the logic stays consistent and cleaner.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c3fa1d44-0599-497e-828b-554cfa2c00ec
📒 Files selected for processing (16)
_src/test/README.md_src/test/endpointGroups.json_src/test/index.php_src/test/script.js_src/test/style.css_src/test/theme.css_src/test/theme.js_src/test2/README.md_src/test2/index.html_src/test2/script.jssrc/api_cod/request.phpsrc/api_cod/status.phpsrc/api_cod/subs/missing_exists.phpsrc/api_cod/subs/titles_infos.phpsrc/endpoint_params.jsonsrc/openapi.json
💤 Files with no reviewable changes (2)
- src/openapi.json
- src/api_cod/request.php
Summary by CodeRabbit
New Features
Bug Fixes