Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-3232

function validate_email is too strict

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 1.6
    • 1.5
    • Authentication
    • None
    • All
    • MySQL
    • MOODLE_15_STABLE
    • MOODLE_16_STABLE

      The function validate_email in lib/weblib.php doesn't validate emails of the form

      firstname.lastname@host.organization.com

      according to the function there may only be a country level domain and a top level domain, so only

      firstname.lastname@organization.com

      would be accepted, which is due to the regular expression:

      return (ereg('[-!#$%&\'*+
      ./0-9=?A-Z
      _`a-z

      {/}~]+'.

      '@'.

      '[-!#$%&\'*+
      /0-9=?A-Z^_`a-z{/}

      ~]+\.'.

      '[-!#$%&\'*+
      ./0-9=?A-Z^_`a-z

      {/}

      ~]+$',

      $address));

            poltawski Dan Poltawski
            imported Imported (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.