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
Introduce mitigations for CVE-2020-6506 #1747
Merged
jamonholmgren
merged 6 commits into
react-native-webview:master
from
kelset:fix/address-cve-2020-6506
Nov 24, 2020
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
abe4085
adding a basic test with the webpage to ensure everything will still …
kelset f308ae1
add basic multiple windows support
kelset 2b13dce
add onCreateWindow override
kelset b0136d1
add the prop as commented so that it's easy to test
kelset 15f37f8
adding documentation
kelset 75b5215
fix - I removed the setup line by mistake
kelset File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, {Component} from 'react'; | ||
import {View} from 'react-native'; | ||
|
||
import WebView from 'react-native-webview'; | ||
|
||
type Props = {}; | ||
type State = {}; | ||
|
||
export default class NativeWebpage extends Component<Props, State> { | ||
state = {}; | ||
|
||
render() { | ||
return ( | ||
<View style={{height: 400}}> | ||
<WebView | ||
source={{uri: 'https://infinite.red'}} | ||
style={{width: '100%', height: '100%'}} | ||
// setSupportMultipleWindows={false} | ||
/> | ||
</View> | ||
); | ||
} | ||
} |
This file contains 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
This file contains 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
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.
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.
Until this vulnerability is fixed, would it make sense to prevent people from disabling it?
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.
Technically the vulnerability in Android WebView is already fixed: https://alesandroortiz.com/articles/uxss-android-webview-cve-2020-6506#android-users (this is just a mitigation)
But since we can't really control nor force this kind of update (but I seem to recall google services being quite "aggressive" in self updating) I don't think we should lock it. In a way it, it will be already forced since it's a new setting that will be defaulted to "true", so by simply bumping the webview version you'll have this behaviour. But I think it'd be much better to allow folks who want to revert the behaviour change to be able to do so.
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.
I agree with keeping it a flag, at least for now.