manirajv06 commented on code in PR #905:
URL: https://github.com/apache/yunikorn-core/pull/905#discussion_r1663485087
##########
pkg/webservice/handlers.go:
##########
@@ -668,12 +669,17 @@ func getPartitionQueue(w http.ResponseWriter, r
*http.Request) {
return
}
queueName := vars.ByName("queue")
- queueErr := validateQueue(queueName)
+ escapedQueueName, err := url.QueryUnescape(queueName)
+ if err != nil {
+ buildJSONErrorResponse(w, err.Error(), http.StatusBadRequest)
+ return
+ }
+ queueErr := validateQueue(escapedQueueName)
Review Comment:
> I realized that the variable name is still incorrect. It should either be
called "unescapedQueueName" or rename the original to "escapedQueueName". If
the unescaped is used more frequently, I'd just leave it and would call the
output of `vars.ByName("queue")` as "escapedQueueName".
Yes, it should be "unescapedQueueName". Made the 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]