Skip to content

Conversation

@prabakarviji
Copy link
Contributor

PR for fix - Image not displaying due to mixed content in android(#8460)

@ghost
Copy link

ghost commented Jul 11, 2016

By analyzing the blame information on this pull request, we identified @mkonicek and @nicklockwood to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jul 11, 2016
@charpeni
Copy link
Contributor

charpeni commented Jul 11, 2016

I'm concerned about the security issue that pull request can do.

The WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content. Some insecure content may be allowed to be loaded by a secure origin and other types of content will be blocked. The types of content are allowed or blocked may change release to release and are not explicitly defined. This mode is intended to be used by apps that are not in control of the content that they render but desire to operate in a reasonably secure environment. For highest security, apps are recommended to use MIXED_CONTENT_NEVER_ALLOW.

IMO, this shouldn't be defined as MIXED_CONTENT_COMPATIBILITY_MODE by default but a prop will be interesting so developers could make their own choice regarding wanted level of security.

@ide
Copy link
Contributor

ide commented Jul 12, 2016

Agree with the prop - let's have good defaults but also provide control.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 12, 2016
* start playing. The default value is `false`.
*/
mediaPlaybackRequiresUserAction: PropTypes.bool,

Choose a reason for hiding this comment

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

no-trailing-spaces: Trailing spaces not allowed.

@prabakarviji prabakarviji changed the title Mixed content issue fixed Mixed content mode issue fix Jul 14, 2016
* Used on Android(5.0+), controls whether Mixed content mode is enabled or not
* @platform android
*/
enableMixedContentMode: PropTypes.bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

can you rename this to mixedContentModeEnabled actually? other props in this component are named xxxEnabled


@ReactProp(name = "enableMixedContentMode")
@ReactProp(name = "mixedContentModeEnabled")
public void setMixedContentMode(WebView view, boolean enabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

and name this setMixedContentModeEnabled

@ide
Copy link
Contributor

ide commented Jul 14, 2016

Looks good, thanks. Will merge after tests pass.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 14, 2016
@prabakarviji
Copy link
Contributor Author

@ide Updated the pull request.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 19, 2016
@ReactProp(name = "mixedContentModeEnabled")
public void setMixedContentModeEnabled(WebView view, boolean enabled) {
if (enabled && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
view.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry looking at the Android API more closely, I think we want to expose the underlying API: always, never, compatibility as enums.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 19, 2016
@ghost
Copy link

ghost commented Aug 27, 2016

@prabakarviji do you have any updates for this pull request? It's been a while since the last update so wanted to check in and see if you've looked at the requested changes.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 27, 2016
@mkonicek
Copy link
Contributor

mkonicek commented Sep 9, 2016

@prabakarviji I'm going through all pull requests and noticed this one hasn't been updated in a while and the last comment requests changes. I'll close this pull request so it doesn't stay open indefinitely but please send a new one if you want to continue working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants