gchar *tmp;
g_return_val_if_fail (prefix, NULL);
-
- if (!subject)
- return g_strdup (prefix);
+
+ if (!subject || subject[0] == '\0')
+ subject = _("mail_va_no_subject");
tmp = g_strchug (g_strdup (subject));
/* cannot contain a forbidden word */
if (len <= 4) {
for (cursor = forbidden_names; cursor && *cursor; ++cursor) {
- g_warning ("%s", *cursor);
if (g_ascii_strcasecmp (folder_name, *cursor) == 0)
return FALSE;
}
if (invalid_char_position != NULL)
*invalid_char_position = NULL;
-
+
+ /* check that the email adress contains exactly one @ */
+ if (!strstr(email_address, "@") ||
+ (strstr(email_address, "@") != g_strrstr(email_address, "@")))
+ {
+ return FALSE;
+ }
+
/* first we validate the name portion (name@domain) */
for (c = email_address; *c; c++) {
if (*c == '\"' &&