mirror of
https://github.com/Intervention/image.git
synced 2025-09-01 18:02:45 +02:00
Merge pull request #1255 from Intervention/bugfix/maximum-path-length
Fix bug with very long file/path names
This commit is contained in:
@@ -16,6 +16,10 @@ class FilePathImageDecoder extends BinaryImageDecoder implements DecoderInterfac
|
||||
throw new DecoderException('Unable to decode input');
|
||||
}
|
||||
|
||||
if (strlen($input) > PHP_MAXPATHLEN) {
|
||||
throw new DecoderException('Unable to decode input');
|
||||
}
|
||||
|
||||
try {
|
||||
if (!@is_file($input)) {
|
||||
throw new DecoderException('Unable to decode input');
|
||||
|
@@ -16,6 +16,10 @@ class FilePathImageDecoder extends BinaryImageDecoder implements DecoderInterfac
|
||||
throw new DecoderException('Unable to decode input');
|
||||
}
|
||||
|
||||
if (strlen($input) > PHP_MAXPATHLEN) {
|
||||
throw new DecoderException('Unable to decode input');
|
||||
}
|
||||
|
||||
try {
|
||||
if (!@is_file($input)) {
|
||||
throw new DecoderException('Unable to decode input');
|
||||
|
Reference in New Issue
Block a user