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 742573 - remember password only works if file contains <form> but not when login filled in by JS
remember password only works if file contains <form> but not when login fille...
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Passwords, Cookies, & Certificates
3.14.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 666326 789825
 
 
Reported: 2015-01-08 09:22 UTC by jiayu.wang
Modified: 2018-01-10 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test page (533 bytes, text/html)
2017-08-16 05:08 UTC, Michael Catanzaro
  Details
web-extension: Handle password forms submitted via JS (2.84 KB, patch)
2017-08-16 05:12 UTC, Michael Catanzaro
none Details | Review
web-extension: Handle password forms submitted via JS (3.30 KB, patch)
2017-08-18 00:25 UTC, Michael Catanzaro
needs-work Details | Review
web-extension: Handle forms submitted through JS (3.80 KB, patch)
2017-11-05 08:00 UTC, Alexander Mikhaylenko
none Details | Review
web-extension: Save password in memory when handling form events (10.66 KB, patch)
2017-11-05 08:00 UTC, Alexander Mikhaylenko
none Details | Review
web-extension: Handle forms submitted through JS (3.79 KB, patch)
2018-01-03 19:46 UTC, Michael Catanzaro
committed Details | Review
web-extension: Save password in memory when handling form events (10.68 KB, patch)
2018-01-03 19:46 UTC, Michael Catanzaro
committed Details | Review
Require WebKitGTK+ 2.19.4 (816 bytes, patch)
2018-01-03 19:49 UTC, Michael Catanzaro
committed Details | Review

Description jiayu.wang 2015-01-08 09:22:15 UTC
Only when the html file contains form that function would works. 
But for www.baidu.com, when I clicked login button, the login form was filled in by javascript. In this kind of situation, the remember password function doesn't work. 

I am afraid we should get the signal when the send form action performed.
Comment 1 Michael Catanzaro 2017-01-04 18:08:35 UTC
I think this should be fixed in 3.23, please complain if it's still a problem.
Comment 2 Michael Catanzaro 2017-08-16 05:05:15 UTC
(In reply to Michael Catanzaro from comment #1)
> I think this should be fixed in 3.23, please complain if it's still a
> problem.

It's still a problem. Details in https://bugs.webkit.org/show_bug.cgi?id=173915.
Comment 3 Michael Catanzaro 2017-08-16 05:08:04 UTC
Created attachment 357687 [details]
Test page

This is Mikhaylenko's test page. I've hosted it at https://people.gnome.org/~mcatanzaro/ephy-form-test.html for a limited period of time.
Comment 4 Michael Catanzaro 2017-08-16 05:12:43 UTC
Note this patch depends on a patch to WebKit.
Comment 5 Michael Catanzaro 2017-08-16 05:12:50 UTC
Created attachment 357688 [details] [review]
web-extension: Handle password forms submitted via JS

Currently, Epiphany relies on the DOM submit event to detect if a form
has been submitted. However, this fails if the form has been submitted
via JavaScript, as the submit event is not emitted in this case. We
can't detect this using DOM alone, so use the new WebKitWebPage signal
that has been provided for this purpose.
Comment 6 Alexander Mikhaylenko 2017-08-16 13:07:49 UTC
With both this patch and webkit patch, I get:

(WebKitWebProcess:15982): GLib-GObject-WARNING **: /home/jhbuild/jhbuild/checkout/glib/gobject/gsignal.c:2523: signal 'will-submit-form' is invalid for instance '0x3001c60' of type 'WebKitWebPage'

(WebKitWebProcess:15989): GLib-GObject-WARNING **: /home/jhbuild/jhbuild/checkout/glib/gobject/gsignal.c:2523: signal 'will-submit-form' is invalid for instance '0x3a3c860' of type 'WebKitWebPage'

(WebKitWebProcess:15991): GLib-GObject-WARNING **: /home/jhbuild/jhbuild/checkout/glib/gobject/gsignal.c:2523: signal 'will-submit-form' is invalid for instance '0x32a11a0' of type 'WebKitWebPage'
Comment 7 Michael Catanzaro 2017-08-16 15:54:01 UTC
(In reply to Alexander Mikhaylenko from comment #6)
> With both this patch and webkit patch, I get:

This turned out to be weird jhbuild problems.
Comment 8 Michael Catanzaro 2017-08-18 00:25:59 UTC
Created attachment 357846 [details] [review]
web-extension: Handle password forms submitted via JS

Currently, Epiphany relies on the DOM submit event to detect if a form
has been submitted. However, this fails if the form has been submitted
via JavaScript, as the submit event is not emitted in this case. We
can't detect this using DOM alone, so use the new WebKitWebPage signal
that has been provided for this purpose.
Comment 9 Michael Catanzaro 2017-10-30 22:49:27 UTC
Hey Alexander, can you please post the latest version of your patches? I'm hoping to land the WebKit API that was needed soon and I notice the patches here look a little stale; I'm sure you had more recent code than this somewhere.
Comment 10 Alexander Mikhaylenko 2017-11-05 08:00:01 UTC
Created attachment 363004 [details] [review]
web-extension: Handle forms submitted through JS
Comment 11 Alexander Mikhaylenko 2017-11-05 08:00:06 UTC
Created attachment 363005 [details] [review]
web-extension: Save password in memory when handling form events

This allows to remember the password even if a website clears
the password field immediately after submitting.
Comment 12 Michael Catanzaro 2017-11-05 15:06:52 UTC
Thanks!
Comment 13 Michael Catanzaro 2018-01-03 18:37:27 UTC
It took longer than expected, but I've landed the new WebKit API in https://trac.webkit.org/changeset/226366/webkit. It's slightly modified from my original proposal.
Comment 14 Michael Catanzaro 2018-01-03 19:46:37 UTC
Created attachment 366259 [details] [review]
web-extension: Handle forms submitted through JS
Comment 15 Michael Catanzaro 2018-01-03 19:46:40 UTC
Created attachment 366260 [details] [review]
web-extension: Save password in memory when handling form events

This allows to remember the password even if a website clears
the password field immediately after submitting.
Comment 16 Michael Catanzaro 2018-01-03 19:49:47 UTC
Created attachment 366261 [details] [review]
Require WebKitGTK+ 2.19.4

For WebKitWebPage::will-submit-form and WebKitFormSubmissionStep
Comment 17 Michael Catanzaro 2018-01-10 16:58:05 UTC
Attachment 366259 [details] pushed as df79db8 - web-extension: Handle forms submitted through JS
Attachment 366260 [details] pushed as 392c199 - web-extension: Save password in memory when handling form events
Attachment 366261 [details] pushed as a24651b - Require WebKitGTK+ 2.19.4