Skip to content

Commit 841e8bd

Browse files
committed
Prevent unserializing the generator
1 parent 9aa6c9e commit 841e8bd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2020-12-11, v1.12.1
4+
5+
This is a security release that prevents a hacker to execute code on the server.
6+
37
## 2020-11-23, v1.12.0
48

59
- Fix ro_RO first and last day of year calculation offset (#65)

src/Faker/Generator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,9 @@ public function __destruct()
293293
{
294294
$this->seed();
295295
}
296+
297+
public function __wakeup()
298+
{
299+
$this->formatters = [];
300+
}
296301
}

0 commit comments

Comments
 (0)