-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[vs17.9] [ClickOnce] [GB18030] Workaround for incorrect encoding of chars in the PUA range of file paths #9669
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
Conversation
…PUA range of file paths
Hello! I noticed that you're targeting one of our servicing branches. Please consider updating the version. |
Hello! I noticed that you're targeting one of our servicing branches. Please consider updating the version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good - I have minor comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(already reviewed - but reviewing as explicitly requested kitten)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me.
…sbuild into user/sujitn/1939151
Fixes #
AB#1939151
Summary
Uri class when passed a GB18030 string with chars in the PUA range incorrectly encodes the PUA chars.
For e.g. if the PUA char is u+e038, Uri encodes it in UTF-8 as %25EE%2580%25B8 instead of %EE%80%B8 by double encoding the %.
The ClickOnce scenario that is failing is when an app's Installation Uri is set to a UNC path that has PUA chars. In this case, the UNC path is written to the Clickonce manifest. When the app is being installed, ClickOnce Runtime will attempt to download the deployment manifest from the UNC path. Since the Uri is incorrectly encoded, this download will fail.
Changes Made
The FormatUrl function is being updated to resolve this issue. This function takes input path as string and return a canonicalized path by constructing a Uri class with the input path and then returning it's AbsoluteUri property.
In the case where the Uri's Scheme is File (file://), the function will now check if there are non-ascii characters in it and if so, create a new Uri with the UriBuilder class. The Uri created by UriBuilder correctly handles PUA range in GB18030.
Customer Impact
ClickOnce apps published with Installation path set to a UNC path containing GB18030 + PUA chars will be installed correctly after this change.
Testing
Failing scenario has been validated and CTI team has run regression tests on affected scenarios (scenarios where Uri are used for publishing).
Notes