Skip to content

Contact Email Address not cleaned/validated #4379

@timedin-de

Description

@timedin-de

Describe the bug

Email Entry is not cleaned on save, when email-adresses are invalid mail delivery fails as unknown error.

The validation could also apply to phone number, address... but i think email is the most critical, because of the automatic nextcloud messages.

This seems like missing a common feature? Is this on purpose or was just never a reason to implement.

I recently had a problem where it would not send calender invites for contacts bc. they contained spaces and i could not find the problem at first.

Steps to reproduce

  1. Go to new or existing contact
  2. Set email entry to invalid address (spaces, no @, no tld...)
  3. Save
  4. Cause Email-Send Action (calender invitation, ...)

Expected behavior

It should'nt be possible to have contacts with invalid email-adresses.

  • Trimming spaces out of email (if some format accidently adds it)
  • Validating and rejecting invalid email-adresses on edit
    • In WebUi
    • On File-Import
    • On CardDav Sync
    • ?Provide way to fix current entrys?

Actual behavior

You can easily add invalid email addresses to contacts and nextcloud tries to send emails to them but fails as unknown.

Contact version

7.0.3

Operating system

No response

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database

MariaDB

Additional info

The profile editor already has a validation system, so can be copied.
Phone Number and Address Validation may be nice, but probably cause problems bc. of different typing, and are not critical, as nextcloud does not use them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions