fleet/pkg
Scott Gress 634aa39746
Escape ampersands in URL when opening browser in windows (#35146)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34847

# Details

In testing the new end-user auth flow for enrolling hosts on Windows, I
noticed that the `&host_uuid=<uuid>` part of the query string was
missing when opening the browser window, causing the SSO login process
to ultimately fail. I discovered that this is because the command we're
using to open the browser interprets `&` as a command separator, so it
needs to be escaped. This PR updated the `open` package for Windows, by
adding escaping to all `&` characters in a URL that are not already
escaped.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

## Testing

- [X] QA'd all new/changed functionality manually

Added a new tool for testing:

```
go run ./tools/open -url "http://google.com?x=y&owl=hoot^&foo=bar"
```

to test that it escapes ampersands correctly (and doesn't
double-escape).

## fleetd/orbit/Fleet Desktop

- [X] Verified compatibility with the latest released version of Fleet
(see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md))
- [X] If the change applies to only one platform, confirmed that
`runtime.GOOS` is used as needed to isolate changes
2025-11-04 09:20:31 -06:00
..
automatic_policy Don't pass the default deb auto-install policy if install status is e.g. uninstalled (#32005) 2025-08-18 17:37:06 -05:00
buildpkg Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
certificate Add SCEP endpoint for host identity. (#30589) 2025-07-11 11:44:07 -03:00
download Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
file 32084 Cisco Secure Client installer fix (#35077) 2025-11-03 15:22:39 -05:00
filepath_windows Allow custom osquery database on fleetd (#16554) 2024-02-05 09:41:06 -03:00
fleetdbase use the latest fleetd-base version for MDM commands (#20078) 2024-06-28 16:35:07 -03:00
fleethttp Bugfix: use an HTTP client that supports proxies for APNS push notifications (#23988) 2024-11-25 09:45:38 -05:00
fleethttpsig Updated httpsig-go library to 1.2.0 and removed vendored version. (#32426) 2025-08-28 14:28:30 -05:00
mdm Update manual MDM enroll flow for macOS to use OTA with SSO (#34650) 2025-11-04 08:24:50 -06:00
nettest fix RunWithNetRetry (#8590) 2022-11-07 16:31:10 +01:00
open Escape ampersands in URL when opening browser in windows (#35146) 2025-11-04 09:20:31 -06:00
optjson NDES SCEP proxy backend (#22542) 2024-10-09 13:47:27 -05:00
race Fix flaky timing test (#23333) 2024-10-29 14:13:17 -03:00
rawjson Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
retry End-user authentication for Window/Linux setup experience: agent (#34847) 2025-11-03 16:41:57 -06:00
scripts Fix windows installer stuck in pending state forever (#22592) 2024-10-02 16:18:37 -04:00
secure Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
spec Fail GitOps run when software package YAML is supplied but fields specific to that file are still specified in the team YAML (#34142) 2025-10-16 13:06:36 -05:00
testutils Updates for getting private key from AWS secrets manager (#32789) 2025-09-19 10:57:02 -05:00
README.md Add CentOS parsing+post-processing to reduce false positives in vulnerability processing (#4037) 2022-02-14 15:13:44 -03:00

pkg directory

This top-level pkg directory contains packages that may be shared between all fleet backend components.