Skip to content
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

Add Spec: Enhanced Security Mode #4647

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tdanielles
Copy link

No description provided.

@tdanielles tdanielles requested a review from david-risney June 25, 2024 23:05
@tdanielles tdanielles changed the title Create EnhancedSecurityMode.md Add Spec: Enhanced Security Mode Jun 25, 2024
@tdanielles tdanielles added the API Proposal Review WebView2 API Proposal for review. label Jun 25, 2024
@david-risney david-risney requested review from aluhrs13 and vickiez July 1, 2024 16:52
specs/EnhancedSecurityMode.md Outdated Show resolved Hide resolved
specs/EnhancedSecurityMode.md Outdated Show resolved Hide resolved
/// be set to Strict.
///
///
HRESULT GetEnhancedSecurityModeEnforceList(
Copy link
Contributor

Choose a reason for hiding this comment

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

We would normally use Get/Set methods like this to represent an array. It would probably be easier (at least in .NET / WinRT) to use a vector/collection here instead. That should be the mutable collection pattern (see the WebView2 API Patterns doc). In COM that's get_EnhancedSecurityModeEnforceList([out] ICoreWebView2StringCollection** value) - a getter only that returns a mutable collection of strings. In WinRT/MIDL3 this should be Vector EnhancedSecurityModeEnforceList { get; } and in .NET a string collection property.

specs/EnhancedSecurityMode.md Outdated Show resolved Hide resolved
specs/EnhancedSecurityMode.md Outdated Show resolved Hide resolved
specs/EnhancedSecurityMode.md Outdated Show resolved Hide resolved
specs/EnhancedSecurityMode.md Outdated Show resolved Hide resolved
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The sample code should show the end dev how to perform a real scenario they may want to do in their app and in the way we imagine the feature should be used. In this sample code it looks like you let the end user edit everything which makes it hard to tell how to use the feature especially hard to tell what the form is of the strings added to the ESM lists.

I would guess that one scenario for the feature is the feature is turned on, its set to strict, and a URI filter for some things that are trusted and known to have perf issues are added. I would think that's the sort of common / recommended case for this feature? If so, then a sample should do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Proposal Review WebView2 API Proposal for review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants