File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ To be released.
4848 - The current version string is displayed at the bottom of the dashboard page.
4949 [[ #136 ] , [ #137 ] by RangHo Lee]
5050
51- - Increased the maximum character limit for posts from 4,096 to 10,000 characters.
51+ - Increased the maximum character limit for posts from 4,096 to 10,000
52+ characters.
53+
54+ - EXIF metadata of attached images are now stripped before storing them
55+ to prevent privacy leaks. [[ #152 ] by NTSK]
5256
5357 - Upgraded Fedify to 1.5.1 and * @fedify/postgres * to 0.3.0.
5458
@@ -67,6 +71,7 @@ To be released.
6771[ #130 ] : https://github.com/fedify-dev/hollo/pull/130
6872[ #136 ] : https://github.com/fedify-dev/hollo/issues/136
6973[ #137 ] : https://github.com/fedify-dev/hollo/pull/137
74+ [ #152 ] : https://github.com/fedify-dev/hollo/pull/152
7075
7176
7277Version 0.5.6
Original file line number Diff line number Diff line change @@ -34,9 +34,14 @@ export async function postMedia(c: Context<{ Variables: Variables }>) {
3434 if ( file . type . startsWith ( "video/" ) ) {
3535 imageBytes = await makeVideoScreenshot ( imageData ) ;
3636 }
37- const image = sharp ( imageBytes ) ;
38- const fileMetadata = await image . metadata ( ) ;
39- const content = new Uint8Array ( imageData ) ;
37+
38+ const image = sharp ( imageBytes ) . rotate ( ) ;
39+ const rmMetaImage = await image . keepIccProfile ( ) . toBuffer ( ) ;
40+ const fileMetadata = await sharp ( rmMetaImage ) . metadata ( ) ;
41+ const content = file . type . startsWith ( "video/" )
42+ ? new Uint8Array ( imageData )
43+ : new Uint8Array ( rmMetaImage ) ;
44+
4045 const extension = mime . getExtension ( file . type ) ;
4146 if ( ! extension ) {
4247 return c . json ( { error : "Unsupported media type" } , 400 ) ;
You can’t perform that action at this time.
0 commit comments