MM-11895: Don't crush user-provided GET parameters on slash command URLs (#9372)
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
14928ceb74
Коммит
d585f9d9a3
@@ -233,7 +233,11 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *
|
||||
var req *http.Request
|
||||
if cmd.Method == model.COMMAND_METHOD_GET {
|
||||
req, _ = http.NewRequest(http.MethodGet, cmd.URL, nil)
|
||||
req.URL.RawQuery = p.Encode()
|
||||
|
||||
if req.URL.RawQuery != "" {
|
||||
req.URL.RawQuery += "&"
|
||||
}
|
||||
req.URL.RawQuery += p.Encode()
|
||||
} else {
|
||||
req, _ = http.NewRequest(http.MethodPost, cmd.URL, strings.NewReader(p.Encode()))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user