Skip to content

Commit

Permalink
Filter out large EXIF entries
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Jan 24, 2024
1 parent 62fddcf commit 300c72c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Listener/ExifMetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ private function sanitizeEntries(array $data): array {
$key = preg_replace('/[^a-zA-Z]/', '_', $key);
}

$cleanData[$key] = $value;
// Arbitrary limit to filter out large EXIF entries.
if (strlen($value) < 1000) {
$cleanData[$key] = $value;
}
}

return $cleanData;
Expand Down

0 comments on commit 300c72c

Please sign in to comment.