projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88bc0c6
)
Throw exception if id not passed into discard
author
eileen
<emcnaughton@wikimedia.org>
Sat, 20 Jun 2020 01:13:13 +0000
(13:13 +1200)
committer
eileen
<emcnaughton@wikimedia.org>
Sat, 20 Jun 2020 01:13:13 +0000
(13:13 +1200)
https://lab.civicrm.org/dev/drupal/-/issues/123 - may not be related but this seems a good precaution
CRM/Contact/BAO/Group.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/Group.php
b/CRM/Contact/BAO/Group.php
index 0722920a6f79df2eddd98a38bff55220c9293fd5..8ce1289fae26a7a22a2aeef09ebfb4529566f03e 100644
(file)
--- a/
CRM/Contact/BAO/Group.php
+++ b/
CRM/Contact/BAO/Group.php
@@
-52,6
+52,9
@@
class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
* @param int $id Group id.
*/
public static function discard($id) {
+ if (!$id || !is_numeric($id)) {
+ throw new CRM_Core_Exception('Invalid group request attempted');
+ }
CRM_Utils_Hook::pre('delete', 'Group', $id, CRM_Core_DAO::$_nullArray);
$transaction = new CRM_Core_Transaction();