@@ -655,6 +655,9 @@ mainController.uploadFavicon = function (req, res) {
655655 }
656656
657657 if ( ! fs . existsSync ( object . filePath ) ) return res . status ( 400 ) . send ( 'File failed to save to disk' )
658+ if ( path . extname ( object . filename ) === '.jpg' || path . extname ( object . filename ) === '.jpeg' ) {
659+ require ( '../helpers/utils' ) . stripExifData ( object . filePath )
660+ }
658661
659662 settingUtil . setSetting ( 'gen:customfavicon' , true , function ( err ) {
660663 if ( err ) return res . status ( 400 ) . send ( 'Failed to save setting to database' )
@@ -727,6 +730,9 @@ mainController.uploadLogo = function (req, res) {
727730 }
728731
729732 if ( ! fs . existsSync ( object . filePath ) ) return res . status ( 400 ) . send ( 'File failed to save to disk' )
733+ if ( path . extname ( object . filename ) === '.jpg' || path . extname ( object . filename ) === '.jpeg' ) {
734+ require ( '../helpers/utils' ) . stripExifData ( object . filePath )
735+ }
730736
731737 settingUtil . setSetting ( 'gen:customlogo' , true , function ( err ) {
732738 if ( err ) return res . status ( 400 ) . send ( 'Failed to save setting to database' )
@@ -800,6 +806,9 @@ mainController.uploadPageLogo = function (req, res) {
800806 }
801807
802808 if ( ! fs . existsSync ( object . filePath ) ) return res . status ( 400 ) . send ( 'File failed to save to disk' )
809+ if ( path . extname ( object . filename ) === '.jpg' || path . extname ( object . filename ) === '.jpeg' ) {
810+ require ( '../helpers/utils' ) . stripExifData ( object . filePath )
811+ }
803812
804813 settingUtil . setSetting ( 'gen:custompagelogo' , true , function ( err ) {
805814 if ( err ) return res . status ( 400 ) . send ( 'Failed to save setting to database' )
0 commit comments