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 755190 - Clearing personal data deletes saved passwords from Geary
Clearing personal data deletes saved passwords from Geary
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Passwords, Cookies, & Certificates
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-17 22:06 UTC by Diogo Campos
Modified: 2015-09-21 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix clearing all passwords from the clear data dialog (1.59 KB, patch)
2015-09-18 17:26 UTC, Michael Catanzaro
committed Details | Review

Description Diogo Campos 2015-09-17 22:06:53 UTC
Versions:

Fedora 23
GNOME Web 3.17.91
WebKitGtk 2.9.91
Geary 0.10.0

Steps to reproduce:

1. Add an email account in Geary (choosing to remember the password).
2. Reboot.
3. Open Geary (everything should be OK).
4. Now open GNOME Web, go into "Web" --> "Preferences" --> "Privacy" --> "Clear personal data..." --> Select everything --> "Clear".
5. Reboot.
6. Open Geary (Now Geary "forgot" the saved passwords).
Comment 1 Michael Catanzaro 2015-09-18 15:25:19 UTC
The code deletes all passwords saved with SECRET_SCHEMA_COMPAT_NETWORK. This is arguably wrong since it deletes all network passwords saved by other applications with this schema. Geary *should* be using a different schema, but so should Epiphany. Epiphany definitely should not be deleting any passwords saved with this schema.

Since we have no way to know which application saved the password, this is frankly unfixable for passwords previously saved. What we can do going forward is to use a separate schema, "leak" all the old passwords so that the user must delete them manually if desired, and delete only new passwords going forward.
Comment 2 Michael Catanzaro 2015-09-18 16:32:42 UTC
Um, actually, we do have our own password schema. We are just deleting all the wrong passwords.

Exception: WebKitGTK+ uses SECRET_SCHEMA_COMPAT_NETWORK for storing HTTP auth credentials. I guess those are the only passwords that the dialog is actually deleting. We probably need new API in WebKitGTK+ to allow specifying which schema to use for these.
Comment 3 Michael Catanzaro 2015-09-18 17:26:16 UTC
Created attachment 311646 [details] [review]
Fix clearing all passwords from the clear data dialog

Epiphany saves passwords with EPHY_FORM_PASSWORD_SCHEMA. If we want to
delete the passwords we've saved, we have to pass that schema to
libsecret. Using the SECRET_SCHEMA_COMPAT_NETWORK guarantees we will
only delete passwords saved by other apps, and none of our own
passwords.

Exception: WebKitGTK+ is saving HTTP auth passwords with
SECRET_SCHEMA_COMPAT_NETWORK. This change means those passwords will no
longer be deleted, which is non-ideal.

This needs to be tested still, but it is a bit inconvenient to do so; I need a development build of Ephy with a test account, since I can't delete my real passwords. Diogo, since you were willing to press that button, are you able to test this easily?
Comment 4 Michael Catanzaro 2015-09-18 17:28:19 UTC
By the way, this is what the passwords dialog does when deleting individual passwords, so it's probably right. ;)
Comment 5 Diogo Campos 2015-09-18 17:30:45 UTC
(In reply to Michael Catanzaro from comment #3)
> Diogo, since you were willing to press that button, are you
> able to test this easily?

Sure. I would need a Fedora build, though :/
Comment 6 Michael Catanzaro 2015-09-18 19:48:43 UTC
(In reply to Diogo Campos from comment #5)
> (In reply to Michael Catanzaro from comment #3)
> > Diogo, since you were willing to press that button, are you
> > able to test this easily?
> 
> Sure. I would need a Fedora build, though :/

I've temporarily posted F23 and F24 RPMs at https://people.gnome.org/~mcatanzaro/ephy-clear-passwords-test/

You'll need to uninstall the Fedora-provided epiphany and epiphany-runtime packages, then install my epiphany-runtime RPM (and after that, optionally, my epiphany RPM, if you want the desktop file).
Comment 7 Diogo Campos 2015-09-18 22:01:52 UTC
GNOME Web no longer deletes passwords from Geary, Michael.

There is any extra test/check that I could do?
Comment 8 Michael Catanzaro 2015-09-18 22:25:20 UTC
Thanks! Can you please also make sure it actually deletes its own passwords now, as well?
Comment 9 Diogo Campos 2015-09-18 23:04:47 UTC
Oh, right. Silly me.

There is a previous problem, however: seems like I am not able to save passwords.

"Remember passwords" is checked, and I am doing logins in Bugzilla and GMail with the "Remember me" options checked/unchecked. BUT, no "do you want to save this password" dialog appears, and nothing is shown in the "manage passwords" modal window.

As I never saved passwords in GNOME Web before (just through the "remember me" option - for some specific sites), I'm doing something wrong?
Comment 10 Diogo Campos 2015-09-18 23:37:26 UTC
To be fair, I downgraded both packages and GNOME Web doesn't save passwords either.

I really needed to uninstall the old packages, first? (I will try, now).
Comment 11 Diogo Campos 2015-09-18 23:49:25 UTC
No luck from uninstalling old then installing new packages. I still can't save passwords.

I will try a "manual reset", then...
Comment 12 Michael Catanzaro 2015-09-19 14:42:18 UTC
(In reply to Diogo Campos from comment #9)
> "Remember passwords" is checked, and I am doing logins in Bugzilla and GMail
> with the "Remember me" options checked/unchecked. BUT, no "do you want to
> save this password" dialog appears, and nothing is shown in the "manage
> passwords" modal window.

If you open up dconf-editor, and navigate to org.gnome.epiphany, is remember-passwords checked there too? Should be.

The password field detection is not especially good, unfortunately. I've never seen it work on Bugzilla, but it does work for me on Google....
Comment 13 Diogo Campos 2015-09-19 20:50:29 UTC
Tried a "manual reset" (uninstall, folders deletion, install, gsettings to default and reboots) and still no luck...

Then, tried a Fedora 23 Alpha Live USB and it works fine...

So, I'm thinking that I'm hitting a keyring related bug, Michael :/

(maybe caused by my "no password" Anaconda install, followed by a password inclusion through GNOME Control Center?)

Anyway, I can't test GNOME Web's password saving until I get some clue of what's going on. Sorry :/
Comment 14 Michael Catanzaro 2015-09-20 00:39:09 UTC
Yeah, it's probably a keyring bug. :(

Anyway, I bet the patch is fine. Thanks for testing!
Comment 15 Michael Catanzaro 2015-09-21 14:52:54 UTC
Attachment 311646 [details] pushed as fdf19b5 - Fix clearing all passwords from the clear data dialog