Skip to content

Commit 522e3fd

Browse files
authored
Merge pull request #23 from troosan/fix_xxe_injection
Fix xxe injection
2 parents d489595 + 4c62e4e commit 522e3fd

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,14 @@
4848

4949
### Features
5050
- Added `\PhpOffice\Common\File::fileGetContents()` (with support of zip://)
51-
- Added Support for PHP 7.1
51+
- Added Support for PHP 7.1
52+
53+
## 0.2.8
54+
55+
### Features
56+
- Added possibility to register namespaces to DOMXpath
57+
- Added Utility to get an Office compatible hash of a password
58+
- Write attribute's value of type float independently of locale
59+
60+
## 0.2.9
61+
- Fix XML Entity injection vulnerability

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.7
1+
0.2.9

src/Common/Microsoft/PasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private static function getAlgorithm($algorithmName)
164164
/**
165165
* Returns the algorithm ID
166166
*
167-
* @param sting $algorithmName
167+
* @param string $algorithmName
168168
* @return int
169169
*/
170170
public static function getAlgorithmId($algorithmName)

src/Common/XMLReader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function getDomFromZip($zipFile, $xmlFile)
7171
*/
7272
public function getDomFromString($content)
7373
{
74+
libxml_disable_entity_loader(true);
7475
$this->dom = new \DOMDocument();
7576
$this->dom->loadXML($content);
7677

0 commit comments

Comments
 (0)