Skip to content

Commit

Permalink
🐛 Fixed the Issue.Move() field injection
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreminiom committed Oct 6, 2024
1 parent 052e18b commit e1a7148
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jira/internal/issue_impl_rich_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package internal

import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
Expand Down Expand Up @@ -394,6 +395,14 @@ func (i *internalRichTextServiceImpl) Move(ctx context.Context, issueKeyOrID, tr
}
}

jsonData, err := json.MarshalIndent(payload, "", " ")
if err != nil {
return nil, err

Check warning on line 400 in jira/internal/issue_impl_rich_text.go

View check run for this annotation

Codecov / codecov/patch

jira/internal/issue_impl_rich_text.go#L400

Added line #L400 was not covered by tests
}

// Print the JSON string
fmt.Println("JSON:", string(jsonData))

endpoint := fmt.Sprintf("rest/api/%v/issue/%v/transitions", i.version, issueKeyOrID)
request, err := i.c.NewRequest(ctx, http.MethodPost, endpoint, "", payload)
if err != nil {
Expand Down

0 comments on commit e1a7148

Please sign in to comment.