Skip to content

Commit 88b9d9d

Browse files
authored
Merge pull request #19 from snoop0x7b/filtered-unserialize
2 parents a65b63a + 555f150 commit 88b9d9d

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

features.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,25 @@ const features = [
371371
},
372372
],
373373
},
374+
{
375+
name: "Filtered unserialize()",
376+
description:
377+
'Filtered unserialize allows developers to specify which classes they expect data to unserialize into. For example: <code>$data = unserialize($foo, ["allowed_classes" => ["MyClass", "MyClass2"]]);</code>. This improves security greatly when using PHP serialization.',
378+
keywords: ["unserialize", "security", "serialize"],
379+
added: "7.0",
380+
deprecated: null,
381+
removed: null,
382+
resources: [
383+
{
384+
name: "PHP 7 New features page (php.net)",
385+
url: "https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.filtered-unserialize",
386+
},
387+
{
388+
name: "Unserialize manual page (php.net)",
389+
url: "https://www.php.net/manual/en/function.unserialize.php",
390+
},
391+
],
392+
},
374393
{
375394
name: "Splat operator / argument unpacking (... operator)",
376395
description:

index.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,22 @@ <h3>Nothing matches!</h3>
8888
<li>
8989
We know about the thing, but your search didn't find it - try
9090
again! If you think search didn't work for a given feature, please
91-
raise an issue or PR on <a href="https://github.com/rosswintle/can-i-php">
92-
the GitHub repo</a> to improve the keywords.
91+
raise an issue or PR on
92+
<a href="https://github.com/rosswintle/can-i-php">
93+
the GitHub repo</a
94+
>
95+
to improve the keywords.
9396
</li>
9497
<li>
9598
The feature was not added in, deprecated from or removed from a
96-
recent PHP version. caniphp.com is not a list of ALL PHP
97-
functions and features, just those added or removed in recent
98-
versions.
99+
recent PHP version. caniphp.com is not a list of ALL PHP functions
100+
and features, just those added or removed in recent versions.
99101
</li>
100102
<li>
101-
We don't know about the thing yet. The information here is being
102-
manually curated, and is not yet complete. So please bear
103-
with us as we add more data, or contribute what you were looking
104-
for on <a href="https://github.com/rosswintle/can-i-php">GitHub.</a>
103+
We don't know about the thing yet. The information here is being
104+
manually curated, and is not yet complete. So please bear with us
105+
as we add more data, or contribute what you were looking for on
106+
<a href="https://github.com/rosswintle/can-i-php">GitHub.</a>
105107
</li>
106108
</ul>
107109
<p>

0 commit comments

Comments
 (0)