-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edible Scripts Backend #25739
Edible Scripts Backend #25739
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25739 +/- ##
==========================================
- Coverage 63.59% 63.58% -0.01%
==========================================
Files 1622 1625 +3
Lines 155023 155573 +550
Branches 3967 3967
==========================================
+ Hits 98580 98923 +343
- Misses 48662 48834 +172
- Partials 7781 7816 +35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sounds delicious 🍰 |
server/service/scripts.go
Outdated
val := r.MultipartForm.Value["id"] | ||
if len(val) < 1 { | ||
return nil, &fleet.BadRequestError{Message: "no script id"} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we typically require the entity ID to be part of the body in a PATCH request? It's already present in the URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, I'll take another look at this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested 👍 , code and tests look good, just the one question about requiring script ID in the body.
@sgress454 Looks like it wasn't even needed, I wasn't sure if URL decoding was handled when we do a custom |
Tests failing, maybe I'll have to add it back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested 👍
#24602
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.
SELECT *
is avoided, SQL injection is prevented (using placeholders for values in statements)