From 4e38e8e5c5458554a2d9107107fb0646b11df4e8 Mon Sep 17 00:00:00 2001 From: Ian Littman Date: Thu, 24 Oct 2024 09:54:24 -0700 Subject: [PATCH] s/urf-8/utf-8 on manual config profile download (#23169) # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Manual QA for all new/changed functionality --- changes/urf-8 | 1 + docs/REST API/rest-api.md | 2 +- server/service/devices.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/urf-8 diff --git a/changes/urf-8 b/changes/urf-8 new file mode 100644 index 0000000000..23095d9072 --- /dev/null +++ b/changes/urf-8 @@ -0,0 +1 @@ +* Fixed incorrect character set header on manual Mac enrollment config download diff --git a/docs/REST API/rest-api.md b/docs/REST API/rest-api.md index f280d02024..d5b7947dcf 100644 --- a/docs/REST API/rest-api.md +++ b/docs/REST API/rest-api.md @@ -5867,7 +5867,7 @@ Learn more about OTA profiles [here](https://developer.apple.com/library/archive ```http Content-Length: 542 - Content-Type: application/x-apple-aspen-config; charset=urf-8 + Content-Type: application/x-apple-aspen-config; charset=utf-8 Content-Disposition: attachment;filename="fleet-mdm-enrollment-profile.mobileconfig" X-Content-Type-Options: nosniff ``` diff --git a/server/service/devices.go b/server/service/devices.go index 494d2b329a..605503ff81 100644 --- a/server/service/devices.go +++ b/server/service/devices.go @@ -498,7 +498,7 @@ func (r getDeviceMDMManualEnrollProfileResponse) hijackRender(ctx context.Contex // detect short writes (if it fails to send the full content properly) w.Header().Set("Content-Length", strconv.FormatInt(int64(len(r.Profile)), 10)) // this content type will make macos open the profile with the proper application - w.Header().Set("Content-Type", "application/x-apple-aspen-config; charset=urf-8") + w.Header().Set("Content-Type", "application/x-apple-aspen-config; charset=utf-8") // prevent detection of content, obey the provided content-type w.Header().Set("X-Content-Type-Options", "nosniff")