Skip to content

Commit dcb1603

Browse files
author
Hayder Sharhan
committed
MAGETWO-48819: [GitHub #3233] Arbitrary PHP code execution in M2.0.2
- Removed eval statement from phrase parser.
1 parent 45c6b82 commit dcb1603

File tree

1 file changed

+1
-3
lines changed
  • setup/src/Magento/Setup/Module/I18n/Dictionary

1 file changed

+1
-3
lines changed

setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ private function getCompiledString($string)
275275
$string = preg_replace('/([^\\\\])' . $encloseQuote . ' ?\. ?' . $encloseQuote . '/', '$1', $string);
276276
$string = addslashes($string);
277277
}
278-
$evalString = 'return ' . $encloseQuote . $string . $encloseQuote . ';';
279-
$result = @eval($evalString);
280-
return is_string($result) ? $result : $string;
278+
return $string;
281279
}
282280
}

0 commit comments

Comments
 (0)