Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 75a56fd2056e2bfa2ca5aee042b6ec2e5d127468
Ticket: 921072ffffffffffffffffffffffffffffffffff
Regexp misparses some URL
User & Date: nobody on 2004-03-22 15:35:40
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    A URL of the form
    http://foo.com/@bar.com/url.ext
    is misparsed with the host being bar.com instead of foo.com.
    
    The problem is an attempt to parse [email protected] type URL
    
    This code is where it happens:
    
           set exp {^(([^:]*)://)?([^@]+@)?([^/:]+)(:([0-9]+))?(/.*)?$}
           if {![regexp -nocase $exp $url x prefix proto user host y port srvurl]} {
    
    This modification (adding a / to the unrecognzed characters as part of a 
    "name@" field) solves the problem.
      
            set exp {^(([^:]*)://)?([^@/]+@)?([^/:]+)(:([0-9]+))?(/.*)?$}
            if {![regexp -nocase $exp $url x prefix proto user host y port srvurl]} {
    
    Submitted by [email protected]
    
  4. foundin changed to: "obsolete: 8.4.6"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "29. http Package"
  10. title changed to: "Regexp misparses some URL"
  11. type changed to: "Bug"