Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
1c0bb994
Commit
1c0bb994
authored
3 years ago
by
Seamus Lee
Committed by
totten
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
security/core#113 Apply patch from Mathieu to fix SQLI in participant import
parent
d7f26ca3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Event/Import/Parser/Participant.php
+6
-10
6 additions, 10 deletions
CRM/Event/Import/Parser/Participant.php
with
6 additions
and
10 deletions
CRM/Event/Import/Parser/Participant.php
+
6
−
10
View file @
1c0bb994
...
...
@@ -294,11 +294,9 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
}
else
{
$eventTitle
=
$params
[
'event_title'
];
$qParams
=
[];
$dao
=
new
CRM_Core_DAO
();
$params
[
'participant_role_id'
]
=
$dao
->
singleValueQuery
(
"SELECT default_role_id FROM civicrm_event WHERE title = '
$eventTitle
' "
,
$qParams
);
$params
[
'participant_role_id'
]
=
CRM_Core_DAO
::
singleValueQuery
(
'SELECT default_role_id FROM civicrm_event WHERE title = %1'
,
[
1
=>
[
$eventTitle
,
'String'
]
]);
}
}
...
...
@@ -552,11 +550,9 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
if
(
!
CRM_Utils_Rule
::
integer
(
$value
))
{
return
civicrm_api3_create_error
(
"Event ID is not valid:
$value
"
);
}
$dao
=
new
CRM_Core_DAO
();
$qParams
=
[];
$svq
=
$dao
->
singleValueQuery
(
"SELECT id FROM civicrm_event WHERE id =
$value
"
,
$qParams
);
$svq
=
CRM_Core_DAO
::
singleValueQuery
(
'SELECT id FROM civicrm_event WHERE id = %1'
,
[
1
=>
[
$value
,
'Integer'
]
]);
if
(
!
$svq
)
{
return
civicrm_api3_create_error
(
"Invalid Event ID: There is no event record with event_id =
$value
."
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment