mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
Fixes both #10378 and https://github.com/fleetdm/confidential/issues/2133 On `main`: ```sh curl -v -k -X POST -H "Authorization: Bearer $TEST_TOKEN" \ https://localhost:8080/api/latest/fleet/queries/run \ -d '{ "query": "select \"With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.\" as Rationale;" }' < HTTP/2 500 < content-type: application/json; charset=utf-8 < content-length: 130 < date: Fri, 10 Mar 2023 17:50:40 GMT < { "message": "invalid query's SQL", "errors": [ { "name": "base", "reason": "invalid query's SQL" } ] } ``` With changes in this PR: ```sh curl -v -k -X POST -H "Authorization: Bearer $TEST_TOKEN" \ https://localhost:8080/api/latest/fleet/queries/run \ -d '{ "query": "select \"With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.\" as Rationale;", "selected": { "hosts": [57] } }' < HTTP/2 200 < content-type: application/json; charset=utf-8 < content-length: 325 < date: Fri, 10 Mar 2023 17:49:40 GMT < { "campaign": { "created_at": "0001-01-01T00:00:00Z", "updated_at": "0001-01-01T00:00:00Z", "Metrics": { "TotalHosts": 1, "OnlineHosts": 1, "OfflineHosts": 0, "MissingInActionHosts": 0, "NewHosts": 0 }, "id": 87, "query_id": 85, "status": 0, "user_id": 1 } } ``` - [X] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or docs/Contributing/API-for-contributors.md)~ - ~[ ] Documented any permissions changes~ - ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements)~ - ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for new osquery data ingestion features.~ - [X] Added/updated tests - [X] Manual QA for all new/changed functionality - ~For Orbit and Fleet Desktop changes:~ - ~[ ] Manual QA must be performed in the three main OSs, macOS, Windows and Linux.~ - ~[ ] Auto-update manual QA, from released version of component to new version (see [tools/tuf/test](../tools/tuf/test/README.md)).~ |
||
|---|---|---|
| .. | ||
| .keep | ||
| 8186-fix-bug-with-docker-false-positive | ||
| 8411-jit-provisioning-roles | ||
| 9106-critical-icon-policy-table | ||
| 9415-aggregate-mac-settings-indicators | ||
| 9921-cis-win-10-2.3.10.x | ||
| 9924-cis-win-10-2.3.17.x | ||
| 10104-policy-tab-click-bug | ||
| 10137-show-query-policy-results | ||
| 10138-cis-win10-9-3-x | ||
| 10147-cis-win-10-18.x.x | ||
| 10228-okta-config-values | ||
| 10271-dep-okta | ||
| 10378-remove-attach-check | ||
| bugfix-mdm-settings-documentation | ||
| bugfix-trigger-release-lock | ||
| issue-9124-orbit-enroll-match-by-serial | ||
| issue-9400-add-disk-encryption-fleetctl-apply | ||
| issue-9433-support-modify-team-disk-encryption | ||
| issue-9435-disk-encryption-activities | ||
| issue-9437-add-host-disk-encryption-status | ||
| issue-9591-mdm-profiles-summary | ||
| issue-9596-mdm-profile-filter | ||
| issue-10126-mdm-info | ||
| issue-10136-cis-win-10-9-2-x | ||
| pin-dockerfiles | ||