Copilot commented on code in PR #3743:
URL: https://github.com/apache/brpc/pull/3743#discussion_r4570995444


##########
src/brpc/builtin/hotspots_service.cpp:
##########
@@ -1025,10 +1078,10 @@ static void StartProfiling(ProfilingType type,
         os << "&ccount";
     }
     if (view) {
-        os << "&view=" << *view;
+        os << "&view=" << EncodeProfilePathQuery(*view);
     }
     if (base_name) {
-        os << "&base=" << *base_name;
+        os << "&base=" << EncodeProfilePathQuery(*base_name);

Review Comment:
   This encodes `base` before the request is sent to `*_non_responsive`, but 
`DisplayResult` still reads `GetQuery("base")` directly and validates that 
encoded value without calling `DecodeProfilePathQuery` (around lines 446-469). 
As a result, selecting any diff/base profile makes the non-responsive request 
fail with `Invalid query \`base'`. Decode `base` in `DisplayResult` as well and 
use the decoded path for validation and cache lookup.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to