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

Error in function validate_email()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      Hi,

      I think that I have found an error in the validate_email() function.

      The regular expression afford us to enter emails like this: email@hotmail..

      this is because the function checks that the domain part of the function fits this:

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

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

      ~]+$#

      So, this expression says that we have to write some character(s), then a dot, and finally some character. But this last part allow us to write a dot, because it inside the []

      Please, can you tell me if this is really a bug. And if so, are someone working on it?

      Thanks in advance
      Regards.

      Lucas Herraiz

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              l.herraiz.garcia Lucas Herraiz García
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: