[gnome-online-accounts/gnome-3-24] utils: Domain names may not have a dot; usernames shouldn't be empty
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-24] utils: Domain names may not have a dot; usernames shouldn't be empty
- Date: Wed, 8 Nov 2017 19:20:53 +0000 (UTC)
commit b19de0fe099874a367501f408afaf27682c88c10
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Nov 3 19:54:59 2017 +0100
utils: Domain names may not have a dot; usernames shouldn't be empty
https://bugzilla.gnome.org/show_bug.cgi?id=789187
src/goabackend/goautils.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/goabackend/goautils.c b/src/goabackend/goautils.c
index 7bbc42c..cc362ba 100644
--- a/src/goabackend/goautils.c
+++ b/src/goabackend/goautils.c
@@ -843,17 +843,12 @@ gboolean
goa_utils_parse_email_address (const gchar *email, gchar **out_username, gchar **out_domain)
{
gchar *at;
- gchar *dot;
if (email == NULL || email[0] == '\0')
return FALSE;
at = strchr (email, '@');
- if (at == NULL || *(at + 1) == '\0')
- return FALSE;
-
- dot = strchr (at + 1, '.');
- if (dot == NULL || *(dot + 1) == '\0')
+ if (at == NULL || at == email || *(at + 1) == '\0')
return FALSE;
if (out_username != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]