Hanabi9248 opened a new pull request, #4376:
URL: https://github.com/apache/hertzbeat/pull/4376

   ## What's changed?
   
   PromQL expressions are inserted directly into query parameters, leaving `+` 
and `&` unescaped. The server decodes addition operators and regex quantifiers 
as spaces, and an ampersand in a label value splits the expression into another 
parameter. For example, `sum(up{job=~"api.+",label="a&b=50%"}) + 1` arrives 
truncated and altered.
   
   Encode the expression as a URI template value in `execute` and both instant 
and range `query` requests. The regression captures the URI from each actual 
executor path and checks the server-decoded parameters, including the range 
bounds and step.
   
   Validation on Windows with Java 25: all 10 query-executor tests pass, 
including the three new regressions that fail before the fix. Maven Checkstyle 
and `git diff --check` pass. The full warehouse suite and a live Prometheus 
server were not run.
   
   ## Checklist
   
   - [x] I have read the contributing guide.
   - [x] The regression test documents the affected query and expected behavior.
   - [x] Added the necessary unit tests; all query-executor tests pass.
   
   ## Add or update API
   
   No API changes.


-- 
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