mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-11 14:34:16 +08:00
Convert emails obtained from external repositories to lowercase (fixes #1004)
This commit is contained in:
parent
eada3ab687
commit
ef82545fb9
2 changed files with 3 additions and 3 deletions
|
@ -366,11 +366,11 @@ impl LdapMappings {
|
|||
}
|
||||
} else if self.attr_email_address.contains(&attr) {
|
||||
for item in value {
|
||||
principal.prepend_str(PrincipalField::Emails, item);
|
||||
principal.prepend_str(PrincipalField::Emails, item.to_lowercase());
|
||||
}
|
||||
} else if self.attr_email_alias.contains(&attr) {
|
||||
for item in value {
|
||||
principal.append_str(PrincipalField::Emails, item);
|
||||
principal.append_str(PrincipalField::Emails, item.to_lowercase());
|
||||
}
|
||||
} else if let Some(idx) = self.attr_description.iter().position(|a| a == &attr) {
|
||||
if !principal.has_field(PrincipalField::Description) || idx == 0 {
|
||||
|
|
|
@ -291,7 +291,7 @@ impl SqlMappings {
|
|||
}
|
||||
} else if name.eq_ignore_ascii_case(&self.column_email) {
|
||||
if let Value::Text(text) = value {
|
||||
principal.set(PrincipalField::Emails, text.into_owned());
|
||||
principal.set(PrincipalField::Emails, text.to_lowercase());
|
||||
}
|
||||
} else if name.eq_ignore_ascii_case(&self.column_quota) {
|
||||
if let Value::Integer(quota) = value {
|
||||
|
|
Loading…
Add table
Reference in a new issue