fleet/pkg/file
Ian Littman 7fb9a94384
Use install path on packageInfo XML if it's a .app before falling back to bundle ID for PKG name extraction (#30669)
Fixes #25587. SubEthaEdit packgeInfo file is a bit bigger, but the only
thing different is the list of package IDs included, and that's not what
was broken/fixed here, so went with an abbreviated version that better
demonstrates what got fixed here.

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/guides/committing-changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved extraction of application names from uploaded PKG packages by
using the install path as a fallback method.

* **Tests**
* Added a new test case to verify correct name extraction from PKG
packages using the install path.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-09 08:21:10 -05:00
..
scripts Use pkgutil approach to be more effective at uninstalling (#22618) 2024-10-03 14:21:23 -03:00
testdata Use install path on packageInfo XML if it's a .app before falling back to bundle ID for PKG name extraction (#30669) 2025-07-09 08:21:10 -05:00
deb.go Add support for zstd deb packages (#23657) 2024-11-11 14:13:01 -05:00
file.go Split .tar.gz extraction into installer and TUF implementations to remove permissions checks on installer implementation (#28888) 2025-05-06 21:10:14 -05:00
file_bench_test.go Improve memory usage of software installers parsing (#23596) 2024-11-12 09:28:08 -05:00
file_test.go Improve memory usage of software installers parsing (#23596) 2024-11-12 09:28:08 -05:00
management.go Remove default EXE install/uninstall scripts, require entering install/uninstall scripts on EXE upload (#27268) 2025-03-31 13:52:06 -05:00
management_test.go Remove default EXE install/uninstall scripts, require entering install/uninstall scripts on EXE upload (#27268) 2025-03-31 13:52:06 -05:00
msi.go Properly decode MSI product names from Windows-1252 (#29245) 2025-05-19 10:39:57 -05:00
pdf.go Consider an empty EULA pdf file the same as an invalid one, returning 400 Bad Request (#12542) 2023-06-28 08:19:42 -04:00
pdf_test.go Consider an empty EULA pdf file the same as an invalid one, returning 400 Bad Request (#12542) 2023-06-28 08:19:42 -04:00
pe.go Fall back to FileVersion when an EXE installer has FileVersion but not ProductVersion (#25070) 2024-12-31 14:28:15 -06:00
pe_test.go Improve memory usage of software installers parsing (#23596) 2024-11-12 09:28:08 -05:00
rpm.go Add support to upload RPM packages (#22502) 2024-10-01 13:02:13 -03:00
rpm_test.go Improve memory usage of software installers parsing (#23596) 2024-11-12 09:28:08 -05:00
tgz.go Add .tar.gz package support (#28339) 2025-05-02 09:07:35 -05:00
validation.go cli: try to infer the bootstrap package name from the URL too (#11571) 2023-05-11 10:36:28 -03:00
validation_test.go cli: try to infer the bootstrap package name from the URL too (#11571) 2023-05-11 10:36:28 -03:00
xar.go Use install path on packageInfo XML if it's a .app before falling back to bundle ID for PKG name extraction (#30669) 2025-07-09 08:21:10 -05:00
xar_test.go Use install path on packageInfo XML if it's a .app before falling back to bundle ID for PKG name extraction (#30669) 2025-07-09 08:21:10 -05:00