Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pictures EXIF location info gets modified when uploaded by "share to" from galleries #6531

Closed
nRaecheR opened this issue Jul 24, 2020 · 11 comments
Labels
bug needs info Waiting for info from user(s). Issues with this label will auto-stale.

Comments

@nRaecheR
Copy link

nRaecheR commented Jul 24, 2020

Steps to reproduce

  1. Choose a picture from the Gallery with valid EXIF location data
  2. Choose share and then select Nextcloud app
  3. Select folder on NC server and upload

Expected behaviour

  • The picture will be uploaded unmodified with valid EXIF data

Actual behaviour

  • The picture will be modifiied and the EXIF location data will be set to an invalid value (0/0, 0/0, 0/0 for long and lat). When uploaded directly from Nextcloud the geotags won't be modified and the file is identical to the original file. I would expect that the file is identical when sending through the gallery instead of the NC app itself. Tried is with several apps, it seems the "share" mechanism of Android "sanitizes" the picture somehow.
    I can't reproduce it with a Samsung S8+ and Android 9.

Environment data

Android version: 10

Device model: Samsung Galaxy S10+ (SM-G975F)

Stock or customized system: Stock

Nextcloud app version: 3.12.1

Nextcloud server version: 19.0.1

Reverse proxy:

Logs

EXIF data of unmodified picture

EXIF tags in '20200723_165737.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Image Width         |4032
Image Length        |2268
Manufacturer        |samsung
Model               |SM-G975F
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Software            |G975FXXS7CTF3
Date and Time       |2020:07:23 16:57:37
YCbCr Positioning   |Centered
Exposure Time       |1/6624 sec.
F-Number            |f/1.5
Exposure Program    |Normal program
ISO Speed Ratings   |50
Exif Version        |Exif Version 2.2
Date and Time (Origi|2020:07:23 16:57:37
Date and Time (Digit|2020:07:23 16:57:37
Shutter Speed       |0.00 EV (1/1 sec.)
Aperture            |1.16 EV (f/1.5)
Brightness          |25.27 EV (138627117.32 cd/m^2)
Exposure Bias       |0.00 EV
Maximum Aperture Val|2.52 EV (f/2.4)
Metering Mode       |Center-weighted average
Flash               |Flash did not fire
Focal Length        |4.3 mm
Color Space         |sRGB
Pixel X Dimension   |4032
Pixel Y Dimension   |2268
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Digital Zoom Ratio  |1.00
Focal Length in 35mm|26
Scene Capture Type  |Standard
Image Unique ID     |L12XLLD01VM
FlashPixVersion     |FlashPix Version 1.0
North or South Latit|N
Latitude            |49, xx, 20.658480
East or West Longitu|E
Longitude           | 8, yy, 25.116599

xx,yy modified for privacy

EXIF data of shared, modified picture

EXIF tags in '20200723_165737-geteilt.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Image Width         |4032
Image Length        |2268
Manufacturer        |samsung
Model               |SM-G975F
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Software            |G975FXXS7CTF3
Date and Time       |2020:07:23 16:57:37
YCbCr Positioning   |Centered
Exposure Time       |1/6624 sec.
F-Number            |f/1.5
Exposure Program    |Normal program
ISO Speed Ratings   |50
Exif Version        |Exif Version 2.2
Date and Time (Origi|2020:07:23 16:57:37
Date and Time (Digit|2020:07:23 16:57:37
Shutter Speed       |0.00 EV (1/1 sec.)
Aperture            |1.16 EV (f/1.5)
Brightness          |25.27 EV (138627117.32 cd/m^2)
Exposure Bias       |0.00 EV
Maximum Aperture Val|2.52 EV (f/2.4)
Metering Mode       |Center-weighted average
Flash               |Flash did not fire
Focal Length        |4.3 mm
Color Space         |sRGB
Pixel X Dimension   |4032
Pixel Y Dimension   |2268
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Digital Zoom Ratio  |1.00
Focal Length in 35mm|26
Scene Capture Type  |Standard
Image Unique ID     |L12XLLD01VM
FlashPixVersion     |FlashPix Version 1.0
North or South Latit|
Latitude            |0/0, 0/0, 0/0
East or West Longitu|
Longitude           |0/0, 0/0, 0/0

@nRaecheR nRaecheR added the bug label Jul 24, 2020
@tobiasKaminsky
Copy link
Member

Can you share the file to another app, eg. mail app?
I suspect that this is not by NC, as we do not tamper with exif at all.

@tobiasKaminsky tobiasKaminsky added the needs info Waiting for info from user(s). Issues with this label will auto-stale. label Jul 24, 2020
@nRaecheR
Copy link
Author

nRaecheR commented Jul 24, 2020

I tried the same with K9 Mail and it works as expected. The EXIF geo location data is intact and correct. The sha256 hash of the file is identical too. With Nextcloud it differs.

@nRaecheR
Copy link
Author

Correction: It was Samsung Mail not K9 Mail, sorry

@tobiasKaminsky
Copy link
Member

* I can't reproduce it with a Samsung S8+ and Android 9.

I cannot reproduce this on my Oneplus 6T or Emulator.

Can you try to upload it the other way around?
Open NC app, upload file via "+" and see it still differs?

@nRaecheR
Copy link
Author

From the NC Android app itself it works normally and the files won't be modified. As I said we can only reproduce it with the SGS10+ with Android 10 and not with the SGS8+ with Android 9. WIth another device with Android 9 it works as expected too. The SGS10+ is the only device with Android 10 so far.
I suspect some kind of privacy sanitation with a whitelist of apps. Unfortunately it is a mobile of one of my users and not mine, mine is the SGS8+.

@stale
Copy link

stale bot commented Aug 24, 2020

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Aug 24, 2020
@tobiasKaminsky
Copy link
Member

From the NC Android app itself it works normally and the files won't be modified

Glad to hear.

But then I fear that SGS10+ with Android 10 is doing some strange/unknown/unwanted things, or at least things that are not proper shown to user…
I fear that I cannot help you, as this is out of scope (we can only handle the data we receive from other apps)

@stale stale bot removed the stale label Aug 25, 2020
@nRaecheR
Copy link
Author

This issue is NOT stale, the bug is still existing. I've tested it today with latest Android client 3.13.0 and the behavior is exactly the same.

@nRaecheR
Copy link
Author

...and closing the bug isn't the right thing to do as long as it isn't clear where's the reason for the problem....

@tobiasKaminsky
Copy link
Member

...and closing the bug isn't the right thing to do as long as it isn't clear where's the reason for the problem....

You said that upload from within NC app works fine. And that it is only happening on SGS10+ with Android 10.
So it must be something on sending side, and is not related to our app.
Therefore I closed it.

Please file a bug on Samsung.

@mnalis
Copy link

mnalis commented May 4, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs info Waiting for info from user(s). Issues with this label will auto-stale.
Projects
None yet
Development

No branches or pull requests

3 participants