1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-01 01:51:43 +02:00

Compare to normalized base64 data to avoid false negatives

This commit is contained in:
Kaloyan Doichinov
2017-10-21 17:09:54 +02:00
parent a54d1e9e6a
commit 9dfc5cb1e4

View File

@@ -262,7 +262,7 @@ abstract class AbstractDecoder
return false;
}
return base64_encode(base64_decode($this->data)) === $this->data;
return base64_encode(base64_decode($this->data)) === str_replace(["\n", "\r", "\t", " "], '', $this->data);
}
/**