mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-15 08:28:52 +08:00
Update ImageRepo.php
fix image validation vulnerability
This commit is contained in:
@ -38,7 +38,7 @@ class ImageRepo
|
|||||||
*/
|
*/
|
||||||
public function imageExtensionSupported(string $extension): bool
|
public function imageExtensionSupported(string $extension): bool
|
||||||
{
|
{
|
||||||
return in_array(trim($extension, '. \t\n\r\0\x0B'), static::$supportedExtensions);
|
return in_array(trim($extension, ". \t\n\r\0\x0B"), static::$supportedExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user