update composer libs

This commit is contained in:
Mario Vavti 2019-06-17 11:50:17 +02:00
parent f106b1db15
commit c0b9ab930d
9 changed files with 125 additions and 87 deletions

22
composer.lock generated
View File

@ -8,16 +8,16 @@
"packages": [
{
"name": "blueimp/jquery-file-upload",
"version": "v9.30.0",
"version": "v9.31.0",
"source": {
"type": "git",
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558"
"reference": "2485bf016e1085f0cd8308723064458cb0af5729"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/1fceec556879403e5c1ae32a7c448aa12b8c3558",
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558",
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/2485bf016e1085f0cd8308723064458cb0af5729",
"reference": "2485bf016e1085f0cd8308723064458cb0af5729",
"shasum": ""
},
"type": "library",
@ -59,7 +59,7 @@
"upload",
"widget"
],
"time": "2019-04-22T09:21:57+00:00"
"time": "2019-05-24T07:59:46+00:00"
},
{
"name": "bshaffer/oauth2-server-php",
@ -957,16 +957,16 @@
},
{
"name": "sabre/xml",
"version": "1.5.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
"url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e",
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e",
"shasum": ""
},
"require": {
@ -978,7 +978,7 @@
"sabre/uri": ">=1.0,<3.0.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"phpunit/phpunit": "~4.8|~5.7",
"sabre/cs": "~1.0.0"
},
"type": "library",
@ -1016,7 +1016,7 @@
"dom",
"xml"
],
"time": "2016-10-09T22:57:52+00:00"
"time": "2019-01-09T13:51:57+00:00"
},
{
"name": "simplepie/simplepie",

View File

@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "9.30.0",
"version": "9.31.0",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&amp;drop support, progress bar, validation and preview images.",
"keywords": [

View File

@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "9.30.0",
"version": "9.31.0",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
"keywords": [

View File

@ -43,9 +43,9 @@ class UploadHandler
const IMAGETYPE_PNG = 3;
protected $image_objects = array();
protected $response = array();
public function __construct($options = null, $initialize = true, $error_messages = null) {
$this->response = array();
$this->options = array(
'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')),
'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
@ -377,7 +377,11 @@ class UploadHandler
public function get_config_bytes($val) {
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
if (is_numeric($val)) {
$val = (int)$val;
} else {
$val = (int)substr($val, 0, -1);
}
switch ($last) {
case 'g':
$val *= 1024;
@ -451,7 +455,7 @@ class UploadHandler
unset($tmp);
}
}
if (!empty($img_width)) {
if (!empty($img_width) && !empty($img_height)) {
if ($max_width && $img_width > $max_width) {
$file->error = $this->get_error_message('max_width');
return false;
@ -795,9 +799,10 @@ class UploadHandler
// Handle transparency in GIF and PNG images:
switch ($type) {
case 'gif':
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
break;
case 'png':
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
case 'png':
imagealphablending($new_img, false);
imagesavealpha($new_img, true);
break;
@ -827,7 +832,12 @@ class UploadHandler
$image->setResourceLimit($type, $limit);
}
}
try {
$image->readImage($file_path);
} catch (ImagickException $e) {
error_log($e->getMessage());
return null;
}
$this->image_objects[$file_path] = $image;
}
return $this->image_objects[$file_path];
@ -884,6 +894,7 @@ class UploadHandler
$file_path,
!empty($options['crop']) || !empty($options['no_cache'])
);
if (is_null($image)) return false;
if ($image->getImageFormat() === 'GIF') {
// Handle animated GIFs:
$images = $image->coalesceImages();
@ -897,11 +908,9 @@ class UploadHandler
if (!empty($options['auto_orient'])) {
$image_oriented = $this->imagick_orient_image($image);
}
$image_resize = false;
$new_width = $max_width = $img_width = $image->getImageWidth();
$new_height = $max_height = $img_height = $image->getImageHeight();
// use isset(). User might be setting max_width = 0 (auto in regular resizing). Value 0 would be considered empty when you use empty()
if (isset($options['max_width'])) {
$image_resize = true;
@ -911,9 +920,7 @@ class UploadHandler
$image_resize = true;
$new_height = $max_height = $options['max_height'];
}
$image_strip = (isset($options['strip']) ? $options['strip'] : false);
if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) {
if ($file_path !== $new_file_path) {
return copy($file_path, $new_file_path);
@ -1319,8 +1326,7 @@ class UploadHandler
$json = json_encode($content);
$redirect = stripslashes($this->get_post_param('redirect'));
if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) {
$this->header('Location: '.sprintf($redirect, rawurlencode($json)));
return;
return $this->header('Location: '.sprintf($redirect, rawurlencode($json)));
}
$this->head();
if ($this->get_server_var('HTTP_CONTENT_RANGE')) {

View File

@ -1,20 +1,20 @@
[
{
"name": "blueimp/jquery-file-upload",
"version": "v9.30.0",
"version_normalized": "9.30.0.0",
"version": "v9.31.0",
"version_normalized": "9.31.0.0",
"source": {
"type": "git",
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558"
"reference": "2485bf016e1085f0cd8308723064458cb0af5729"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/1fceec556879403e5c1ae32a7c448aa12b8c3558",
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558",
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/2485bf016e1085f0cd8308723064458cb0af5729",
"reference": "2485bf016e1085f0cd8308723064458cb0af5729",
"shasum": ""
},
"time": "2019-04-22T09:21:57+00:00",
"time": "2019-05-24T07:59:46+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -984,17 +984,17 @@
},
{
"name": "sabre/xml",
"version": "1.5.0",
"version_normalized": "1.5.0.0",
"version": "1.5.1",
"version_normalized": "1.5.1.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
"url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e",
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e",
"shasum": ""
},
"require": {
@ -1006,10 +1006,10 @@
"sabre/uri": ">=1.0,<3.0.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"phpunit/phpunit": "~4.8|~5.7",
"sabre/cs": "~1.0.0"
},
"time": "2016-10-09T22:57:52+00:00",
"time": "2019-01-09T13:51:57+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {

View File

@ -1,6 +1,12 @@
ChangeLog
=========
1.5.1 (2019-01-09)
------------------
* #161: Prevent infinite loop on empty xml elements
1.5.0 (2016-10-09)
------------------

View File

@ -45,7 +45,7 @@
},
"require-dev": {
"sabre/cs": "~1.0.0",
"phpunit/phpunit" : "*"
"phpunit/phpunit" : "~4.8|~5.7"
},
"config" : {
"bin-dir" : "bin/"

View File

@ -66,9 +66,20 @@ function keyValue(Reader $reader, $namespace = null) {
return [];
}
if (!$reader->read()) {
$reader->next();
return [];
}
if (Reader::END_ELEMENT === $reader->nodeType) {
$reader->next();
return [];
}
$values = [];
$reader->read();
do {
if ($reader->nodeType === Reader::ELEMENT) {
@ -79,7 +90,9 @@ function keyValue(Reader $reader, $namespace = null) {
$values[$clark] = $reader->parseCurrentElement()['value'];
}
} else {
$reader->read();
if (!$reader->read()) {
break;
}
}
} while ($reader->nodeType !== Reader::END_ELEMENT);
@ -144,7 +157,17 @@ function enum(Reader $reader, $namespace = null) {
$reader->next();
return [];
}
$reader->read();
if (!$reader->read()) {
$reader->next();
return [];
}
if (Reader::END_ELEMENT === $reader->nodeType) {
$reader->next();
return [];
}
$currentDepth = $reader->depth;
$values = [];
@ -204,7 +227,9 @@ function valueObject(Reader $reader, $className, $namespace) {
$reader->next();
}
} else {
$reader->read();
if (!$reader->read()) {
break;
}
}
} while ($reader->nodeType !== Reader::END_ELEMENT);

View File

@ -138,7 +138,8 @@ class Service {
* @param string|string[] $rootElementName
* @param string|resource $input
* @param string|null $contextUri
* @return void
* @throws ParseException
* @return array|object|string
*/
function expect($rootElementName, $input, $contextUri = null) {