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 775513 - Assistant allows email to be username only
Assistant allows email to be username only
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: accounts
master
Other Linux
: Normal normal
: 0.12.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on: 714104
Blocks:
 
 
Reported: 2016-12-02 11:15 UTC by Gautier Pelloux-Prayer
Modified: 2017-02-23 03:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
some place where the email is shown (63.91 KB, image/png)
2016-12-02 11:15 UTC, Gautier Pelloux-Prayer
Details

Description Gautier Pelloux-Prayer 2016-12-02 11:15:21 UTC
Created attachment 341232 [details]
some place where the email is shown

At least when using a Gmail account, the assistant will let you enter the email field simply with your username. (because Gmail allows to login with both email and username?).

The problem is, at other places in the application (attached screenshot) we show it as an email address which is disturbing. However when sending emails the "From" field is correctly set to username@gmail.com anyway.
Comment 1 Michael Gratton 2016-12-09 04:21:10 UTC
Good catch. Since the UI says "email", we should probably validate it as an email address.
Comment 2 Michael Gratton 2016-12-09 04:23:41 UTC
See also Bug 714299. Maybe we should use the regex here https://tecnocode.co.uk/2016/12/07/validating-e-mail-addresses/ and ensure that Geary uses that consistently through the code base?

Note this might be impacted by the work Niels is doing on the accounts UI (cc'ed for that reason).
Comment 3 Niels De Graef 2016-12-09 09:29:01 UTC
This is already taken care of in the new accounts design. :)

Side note: we actually already have a validating function in src/engine/rfc822/rfc822-mailbox-address.vala:157
Comment 4 Michael Gratton 2017-02-23 03:26:20 UTC
Sounds good. I just pushed commit 11d093b to take care of it in the meantime, this is using Geary.RFC822.MailboxAddress.is_valid_address as well.