Disable navigate to decompiled sources for assemblies with SuppressIldasmAttribute#24187
Merged
sharwell merged 1 commit intodotnet:dev15.6.xfrom Jan 29, 2018
Merged
Conversation
…dasmAttribute Fixes dotnet#24175
jasonmalinowski
requested changes
Jan 11, 2018
| var useDecompiler = allowDecompilation; | ||
| if (useDecompiler) | ||
| { | ||
| useDecompiler = !symbol.ContainingAssembly.GetAttributes().Any(attribute => attribute.AttributeClass.Name == nameof(SuppressIldasmAttribute)); |
Member
There was a problem hiding this comment.
Should this be checking fully qualified name?
Contributor
Author
There was a problem hiding this comment.
My original approach was to check the fully-qualified name. The more I though about it, it didn't seem to add anything.
Contributor
Author
I don't have tests yet. I'm working on an approach to add them but this is a particularly important PR to take for Preview 4. |
jasonmalinowski
approved these changes
Jan 26, 2018
Member
jasonmalinowski
left a comment
There was a problem hiding this comment.
Good, assuming we have something covering adding an automated test for this.
jinujoseph
approved these changes
Jan 26, 2018
Contributor
|
Approved to merge via link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Customer scenario
A customer enables the Navigate to Decompiled Sources feature, accepts the terms for use, and navigates to a symbol defined in an assembly that has
SuppressIldasmAttributeapplied to it. The source code for the symbol is shown when only the metadata should be showing.Bugs this fixes
Fixes #24175
Workarounds, if any
None.
Risk
Low.
Performance impact
Low.
Is this a regression from a previous update?
No.
Root cause analysis
The initial ILSpy integration (behind a feature flag and disabled by default) was not tested for this case. Manual testing revealed the bug.
How was the bug found?
Manual compliance testing.
Test documentation updated?
A manual test scenario was added.