Skip to content

Improve detection of Dynamics Business Central .app files#846

Merged
dtivel merged 2 commits intomainfrom
dtivel/app-extension
Apr 18, 2025
Merged

Improve detection of Dynamics Business Central .app files#846
dtivel merged 2 commits intomainfrom
dtivel/app-extension

Conversation

@dtivel
Copy link
Collaborator

@dtivel dtivel commented Apr 3, 2025

Resolve #824.

#652 added support for signing Dynamics Business Central .app files, but the .app file extension is not exclusive to Dynamics Business Central apps. In this bug, Sign CLI fails to sign a JSON file with an .app file extension.

This change updates Sign CLI to be smarter about detecting Dynamics Business Central .app files. These files begin with a 4-byte header 4e 41 56 58 (NAVX), so we should only try signing if an .app file starts with this header.

CC @aholstrup1

@dtivel dtivel requested a review from a team as a code owner April 3, 2025 16:35
@dtivel dtivel force-pushed the dtivel/app-extension branch 2 times, most recently from c492166 to 9bb1090 Compare April 3, 2025 17:05
@dtivel dtivel force-pushed the dtivel/app-extension branch from 9bb1090 to ccc15cd Compare April 3, 2025 17:34
@joelverhagen
Copy link
Member

Awesome change. Seems like we can closely move extensions to the dynamic file type as we run into similar bugs. I think the magic byte detection will go a long way.

Is there an escape hatch for the user, before a bug fix like this, so say "myjson.app" should not be signed?

joelverhagen
joelverhagen previously approved these changes Apr 7, 2025
@dtivel
Copy link
Collaborator Author

dtivel commented Apr 7, 2025

Thanks. Yes, there was/is an escape hatch: using glob patterns. However, that approach is not well documented, so I don't see users figuring it out quickly/easily.

@joelverhagen
Copy link
Member

Thanks. Yes, there was/is an escape hatch: using glob patterns. However, that approach is not well documented, so I don't see users figuring it out quickly/easily.

It might be worth giving a minimal, thrown together in that issue description prior to full documentation. If it only takes a minute. Just a thought!

jeffkl
jeffkl previously approved these changes Apr 17, 2025
@dtivel dtivel dismissed stale reviews from jeffkl and joelverhagen via f510ffa April 18, 2025 17:35
@dtivel dtivel requested review from jeffkl and joelverhagen April 18, 2025 17:41
Copy link

@jeffkl jeffkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VSIX signing failed which contains a file with extension ".app"

6 participants