commit 086db80e00649dfb25728c62838b1280514d5353
parent dc613e388b38bdf2f6b52bc5c9245bc055d7f276
Author: Paul <paul@claws-mail.org>
Date: Wed, 1 Jan 2025 13:16:05 +0000
fix bug 4835, 'Disallow a forward slash in (IMAP) account names'
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/prefs_account.c b/src/prefs_account.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2025 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -3584,6 +3584,11 @@ static gint prefs_basic_apply(void)
alertpanel_error(_("Account name is not entered."));
return -1;
}
+ if (strchr(gtk_entry_get_text(GTK_ENTRY(basic_page.acname_entry)), '/') != NULL &&
+ protocol == A_IMAP4) {
+ alertpanel_error(_("Account name cannot contain '/'."));
+ return -1;
+ }
if (*gtk_entry_get_text(GTK_ENTRY(basic_page.addr_entry)) == '\0') {
alertpanel_error(_("Mail address is not entered."));
return -1;