1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Fixed possible JS injection via the title edition

This commit is contained in:
Nicolas Lœuillet 2017-01-17 10:09:04 +01:00
parent 96e2827605
commit 3d9950792c
No known key found for this signature in database
GPG key ID: BDC1EFB5CA0145F2
9 changed files with 26 additions and 22 deletions

View file

@ -780,7 +780,11 @@ class SymfonyRequirements extends RequirementCollection
{
$size = ini_get('realpath_cache_size');
$size = trim($size);
$unit = strtolower(substr($size, -1, 1));
$unit = '';
if (!ctype_digit($size)) {
$unit = strtolower(substr($size, -1, 1));
$size = (int) substr($size, 0, -1);
}
switch ($unit) {
case 'g':
return $size * 1024 * 1024 * 1024;