Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-10651

eZHTTPTool::sendHTTPRequest() doesn't support domain names with dashes

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.4.0alpha1
    • 3.8.7, 3.9.1, 4.1.4, 4.2.0, 4.3.0
    • Misc
    • None

    Description

      If you send an HTTP request using eZHTTPTool::sendHTTPRequest() to an URL with a domain name containing a dash , it's misunderpreted and doesn't get executed.

      To fix it, we just need to add a dash in the regexp on line 228 (in 3.9.1 stable) of lib/ezutils/classes/ezhttptool.php.

      "/^((http[s]?:\/\/)([a-zA-Z0-9_.]+))?([\/]?[~]?(\.?[^.]+[~]?)*)/i"
      

      becomes

      "/^((http[s]?:\/\/)([a-zA-Z0-9_.-]+))?([\/]?[~]?(\.?[^.]+[~]?)*)/i"
      

      Attachments

        Activity

          People

            qwix qwix
            bd bd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: