-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added check for maximum size of downloaded file names #1842
Added check for maximum size of downloaded file names #1842
Conversation
Is this something you are seeing in practice? Edit: Doh, just look at the linked issue dummy 😄 |
Nope. The Maximum "FIle Name String" can be 260 char long. In windows, from v1607 onwards the Maximum "Path Length" is UTF-16 32K char provided that the executable use |
08f42af
to
3d98d79
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
It looks like the component governance checker is down:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Resolves #1808.
This PR adds a check to GetInstallerPostHashValidationFileName that ensures that the filename in the URL does not exceed 260 characters (the maximum
path sizefile name size in Windows). If it does, then the "older" naming style (manifest.version.ext
) is used for the downloaded file. Technically this could still fail if the full length of the path is 260 instead of just the file name, but I thought that was fairly unlikely. If it isn't I can adjust for that too.Tested: manually via the manifest given in the issue. As always, I'm happy to add tests if needed.
Edit: corrected explanation, thanks.
Microsoft Reviewers: Open in CodeFlow