Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate queue_id is a positive integer before passing to the BAO #14355

Merged
merged 1 commit into from
May 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions extern/open.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
require_once 'CRM/Core/Error.php';
require_once 'CRM/Utils/Array.php';
require_once 'CRM/Utils/Type.php';
Copy link
Contributor

Choose a reason for hiding this comment

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

@seamuslee001 do we need Type & Rule here now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are used by the Request function and given that we aren't actually loading the class loader here we can't be certain they are loaded at this point. I don't think Array is used now for this

require_once 'CRM/Utils/Rule.php';
require_once 'CRM/Utils/Request.php';

$config = CRM_Core_Config::singleton();
$queue_id = CRM_Utils_Array::value('q', $_GET);
$queue_id = CRM_Utils_Request::retrieveValue('q', 'Positive', NULL, FALSE, 'GET');
if (!$queue_id) {
echo "Missing input parameters\n";
exit();
Expand Down