[ 
https://issues.apache.org/jira/browse/TS-4143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15110831#comment-15110831
 ] 

ASF GitHub Bot commented on TS-4143:
------------------------------------

Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/430#discussion_r50420560
  
    --- Diff: proxy/hdrs/URL.cc ---
    @@ -1264,7 +1287,7 @@ url_parse_internet(HdrHeap *heap, URLImpl *url, char 
const **start, char const *
           last_colon = 0; // prevent port setting.
         }
       }
    -  if (host._size)
    +  if (host._size && validate_host_name(host))
    --- End diff --
    
    I think here the condition should be to check `host._size` first and then 
for `validate_host_hdr` either set the host (if success) or generate an error 
(if false). It is acceptable to not have a host at all in the URL, but it is 
unacceptable (an error) if there is a host and it's malformed.


> Validate host in GET URL
> ------------------------
>
>                 Key: TS-4143
>                 URL: https://issues.apache.org/jira/browse/TS-4143
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Daniel Xu
>             Fix For: 6.2.0
>
>
> Host headers are currently validated but any potential hosts in the GET URL 
> aren't



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to