[ 
https://issues.apache.org/jira/browse/THRIFT-6109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmytro Shteflyuk resolved THRIFT-6109.
--------------------------------------
    Fix Version/s: 0.25.0
       Resolution: Fixed

> Ruby HTTP client transport should provide a safe endpoint label
> ---------------------------------------------------------------
>
>                 Key: THRIFT-6109
>                 URL: https://issues.apache.org/jira/browse/THRIFT-6109
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Library
>            Reporter: Dmytro Shteflyuk
>            Assignee: Dmytro Shteflyuk
>            Priority: Major
>             Fix For: 0.25.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> h3. Problem
> {{Thrift::HTTPClientTransport#to_s}} returns the literal string 
> {{@\{self.url\}}} rather than a useful description of the configured 
> endpoint. The interpolation is malformed, so diagnostic output does not 
> identify the destination.
> h3. Client impact
> Applications commonly include transports in logs, exceptions, and debugging 
> output. The current label makes it difficult to determine which endpoint a 
> Ruby client is using. A useful replacement must identify whether the 
> transport uses HTTP or HTTPS, without exposing URL userinfo or query 
> parameters in those diagnostic paths.
> h3. Reproduction
> {code:ruby}
> transport = Thrift::HTTPClientTransport.new(
>   "https://user:[email protected]/path/to/service?token=secret";
> )
> puts transport
> # current:  "@{self.url}"
> # desired:  "https(my.domain.com:443/path/to/service)"
> {code}
> h3. Expected behavior
> {{to_s}} should return a readable endpoint label containing the URL scheme, 
> host, port, and path. It must omit userinfo and query parameters.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to