#9680 config-mod accepting invalid e-mail addresses for "Default e-mail domain"
Closed: fixed by rcritten. Opened by rjeffman.

When setting the default email domain, the field accepts an email or a domain name, but it accepts some invalid values as empty dot_atom parts (see RFC 5322, section 3.2.3):

sh-5.1# ipa config-show 2>/dev/null | grep e-mail
  Default e-mail domain: test.local
sh-5.1# ipa config-mod --email user@host.domain....hmm  2>/dev/null | grep e-mail
  Default e-mail domain: user@host.domain....hmm
sh-5.1# ipa config-mod --email host.domain....hmm  2>/dev/null | grep e-mail
  Default e-mail domain: host.domain....hmm

Another issue when accepting an e-mail as the default email domain is that adding or modifying a user providing only the user's mailbox fails as the resulting e-mail address is invalid.

sh-5.1# ipa config-mod --email admin@ipa.test | grep e-mail
  Default e-mail domain: admin@ipa.test
sh-5.1# ipa user-mod auser --email auser | grep e-mail
ipa: ERROR: invalid 'email': invalid e-mail format: auser@admin@ipa.test

The default e-mail domain should only accept valid domains values.


Metadata Update from @rcritten:
- Issue assigned to rcritten

PR https://github.com/freeipa/freeipa/pull/7698

master:

  • 018b3d3dc6d26ec50f73aaea675ecfb8813aaea1 Validate the default e-mail domain in the config plugin

ipa-4-12:

  • c6bac9bcb4fb6c5b4f45dd765be4af03b1c6f291 Validate the default e-mail domain in the config plugin

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata