Opened 3 years ago

Closed 3 years ago

#2535 closed Bug (fixed)

.travel TLD not supported

Reported by: octoquad Owned by:
Priority: normal Milestone: 1.6 Piwik 1.6
Component: Core Keywords:
Cc: Sensitive: no


Currently the TLD .travel is not supported under e-mail reports. When trying to add additional e-mail addresses for "Send report to:" Piwik gives the following error: "The email doesn't have a valid format. (person@…)"

Please could you add .travel to the TLD array.


Change History (4)

comment:1 Changed 3 years ago by halfdan

This is quite easy to fix, in core/Piwik.php:

return (preg_match('/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]{2,4}$/', $email) > 0);

should actually be

return (preg_match('/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]{2,6}$/', $email) > 0);

.museum/.travel and others are currently not accepted as valid TLDs by the regex above.

comment:2 Changed 3 years ago by vipsoft (robocoder)

  • Milestone set to 1.6 Piwik 1.6

We also have internationalized tlds to address in #1755. Maybe address boyh tickeys at the same time, eg using ZF hostname validator.

comment:3 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.7 Piwik 1.7 to 1.6 Piwik 1.6

comment:4 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [5239]) Fixes #2535

Note: See TracTickets for help on using tickets.