After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752964 - GOA reports itself as Android to Google
GOA reports itself as Android to Google
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
3.16.x
Other All
: Normal minor
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
: 755622 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-07-28 15:23 UTC by Jean-François Fortin Tam
Modified: 2015-10-22 23:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (74.25 KB, image/png)
2015-07-28 15:23 UTC, Jean-François Fortin Tam
  Details
google: Stop identifying ourselves as Android (1.47 KB, patch)
2015-07-29 17:56 UTC, Debarshi Ray
committed Details | Review

Description Jean-François Fortin Tam 2015-07-28 15:23:15 UTC
Created attachment 308307 [details]
screenshot

Signing in with G-O-A makes Google send you an email saying that you signed in with an Android device, which is pretty far from the truth...
Comment 1 Debarshi Ray 2015-07-29 16:49:02 UTC
It is because we identify ourselves as Android:
https://debarshiray.wordpress.com/2012/05/16/google-mobile-auth-page/

At the moment, dropping the user agent hackery doesn't adversely affect the UI that gets shown, so I am going to remove it from master. However, there is no guarantee what is going to happen in future because it is not in our control.
Comment 2 Debarshi Ray 2015-07-29 17:56:02 UTC
Created attachment 308413 [details] [review]
google: Stop identifying ourselves as Android
Comment 3 Debarshi Ray 2015-07-29 18:02:18 UTC
Comment on attachment 308413 [details] [review]
google: Stop identifying ourselves as Android

Pushed to master for the next 3.17.x release.
Comment 4 Debarshi Ray 2015-09-28 07:54:06 UTC
*** Bug 755622 has been marked as a duplicate of this bug. ***
Comment 5 Debarshi Ray 2015-09-28 08:13:48 UTC
Now that we don't identify ourselves as Android, Google will think that we are "Safari on Linux" because that is what the default WebKitGTK user-agent claims to be. On Fedora it looks like this:
Mozilla/5.0 (Fedora; Linux x86_64) AppleWebKit/601.1 (KHTML, like Gecko) Version/8.0 Safari/601.1

Epiphany uses:
Mozilla/5.0 (Fedora; Linux x86_64) AppleWebKit/601.1 (KHTML, like Gecko) Version/8.0 Safari/601.1 Epiphany/3.16.2

WebKitGTK would earlier identify itself as Chromium, but that was later changed to Safari. See: https://bugs.webkit.org/show_bug.cgi?id=124229

The "Fedora" bit is a downstream patch, tracked at https://bugs.webkit.org/show_bug.cgi?id=142074 Otherwise it would have been "X11".

Maybe we can use the same thing as Epiphany? Has anyone got a notification from Google when using it? Does it say "Epiphany on Linux"? I can't figure out how to convince Google to send me a notification. The "recently used device settings" just says Safari. I don't know if it picks up the Epiphany specific part.
Comment 6 Ankur Sinha (FranciscoD) 2015-09-28 10:01:52 UTC
Hiya,

I just signed in on Epiphany and Google sent me a notification. It just says "Linux". It doesn't say Epiphany anywhere, not even in the Account settings.

Cheers,
Ankur
Comment 7 Michael Catanzaro 2015-10-22 23:31:59 UTC
(In reply to Ankur Sinha (FranciscoD) from comment #6)
> Hiya,
> 
> I just signed in on Epiphany and Google sent me a notification. It just says
> "Linux". It doesn't say Epiphany anywhere, not even in the Account settings.
> 
> Cheers,
> Ankur

When I tried this a couple of days ago, it said "New sign-in from Safari on Linux"

This is a Google bug, not a WebKit bug. Sites that do user-agent spoofing are responsible for the inevitable breakage. All WebKit-based browsers (including Chrome!) identify as Safari to improve compatibility with differently-broken web sites. There has been some debate as to whether we should add back Chrome, but we almost have to keep Safari in the user agent either way.

Note: since Google has been the biggest offender here, we are thinking about pretending to be Chrome for all google.com domains and only those domains. But that just means you'll get a differently-broken mail.
Comment 8 Michael Catanzaro 2015-10-22 23:33:52 UTC
(In reply to Michael Catanzaro from comment #7)
> When I tried this a couple of days ago, it said "New sign-in from Safari on
> Linux"
> 
> This is a Google bug, not a WebKit bug. Sites that do user-agent spoofing
> are responsible for the inevitable breakage.

Sorry, my brain is only half-on. "Sites that do user-agent parsing" are responsible for the inevitable breakage. It is practically impossible to get this right.