Skip to content

Commit 1d3b458

Browse files
authored
Prevent unserializing the generator (#136)
1 parent 7dea0d7 commit 1d3b458

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
@@ -289,4 +289,9 @@ public function __destruct()
289289
{
290290
$this->seed();
291291
}
292+
293+
public function __wakeup()
294+
{
295+
$this->formatters = [];
296+
}
292297
}

0 commit comments

Comments
 (0)