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
b56a4a96
Commit
b56a4a96
authored
6 years ago
by
totten
Committed by
Seamus Lee
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Harden against serialization vulnerabilities (
#46
)
parent
c997bfa0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Utils/AutoClean.php
+20
-0
20 additions, 0 deletions
CRM/Utils/AutoClean.php
with
20 additions
and
0 deletions
CRM/Utils/AutoClean.php
+
20
−
0
View file @
b56a4a96
...
...
@@ -102,4 +102,24 @@ class CRM_Utils_AutoClean {
\Civi\Core\Resolver
::
singleton
()
->
call
(
$this
->
callback
,
$this
->
args
);
}
/**
* Prohibit (de)serialization of CRM_Utils_AutoClean.
*
* The generic nature of AutoClean makes it a potential target for escalating
* serialization vulnerabilities, and there's no good reason for serializing it.
*/
public
function
__sleep
()
{
throw
new
\RuntimeException
(
"CRM_Utils_AutoClean is a runtime helper. It is not intended for serialization."
);
}
/**
* Prohibit (de)serialization of CRM_Utils_AutoClean.
*
* The generic nature of AutoClean makes it a potential target for escalating
* serialization vulnerabilities, and there's no good reason for deserializing it.
*/
public
function
__wakeup
()
{
throw
new
\RuntimeException
(
"CRM_Utils_AutoClean is a runtime helper. It is not intended for deserialization."
);
}
}
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