From ab3b4750daf64d796ced89584df4d44c1a4c69ee Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Thu, 11 Dec 2014 18:52:04 +0100 Subject: [PATCH] fixed bug with very long data url --- src/Intervention/Image/AbstractDecoder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Intervention/Image/AbstractDecoder.php b/src/Intervention/Image/AbstractDecoder.php index 4c49ab90..efdb7489 100644 --- a/src/Intervention/Image/AbstractDecoder.php +++ b/src/Intervention/Image/AbstractDecoder.php @@ -204,7 +204,7 @@ abstract class AbstractDecoder */ private function decodeDataUrl($data_url) { - $pattern = "/^data:(?:image\/.+)(?:charset=\".+\")?;base64,(?P.+)$/"; + $pattern = "/^data:(?:image\/[a-zA-Z\-\.]+)(?:charset=\".+\")?;base64,(?P.+)$/"; preg_match($pattern, $data_url, $matches); if (is_array($matches) && array_key_exists('data', $matches)) {