MM-11895: Don't crush user-provided GET parameters on slash command URLs (#9372)

This commit is contained in:
alezakos
2018-09-11 22:58:57 +03:00
committed by Jesse Hallam
parent 14928ceb74
commit d585f9d9a3
2 changed files with 7 additions and 2 deletions

View File

@@ -491,6 +491,7 @@ func TestExecuteGetCommand(t *testing.T) {
require.Equal(t, token, values.Get("token"))
require.Equal(t, th.BasicTeam.Name, values.Get("team_domain"))
require.Equal(t, "ourCommand", values.Get("cmd"))
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(expectedCommandResponse.ToJson()))
@@ -500,7 +501,7 @@ func TestExecuteGetCommand(t *testing.T) {
getCmd := &model.Command{
CreatorId: th.BasicUser.Id,
TeamId: th.BasicTeam.Id,
URL: ts.URL,
URL: ts.URL + "/?cmd=ourCommand",
Method: model.COMMAND_METHOD_GET,
Trigger: "getcommand",
Token: token,