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

WebView.enableDragAndDrop security vulnerability #908

Open
jtara opened this issue Oct 2, 2017 · 2 comments
Open

WebView.enableDragAndDrop security vulnerability #908

jtara opened this issue Oct 2, 2017 · 2 comments
Assignees

Comments

@jtara
Copy link

jtara commented Oct 2, 2017

WebView.enableDragAndDrop introduces a security vulnerability: it leaks internal URLs when dragging a button, link, etc.

If ios_direct_local_requests = 0, then this negates the security through obscurity of randomizing the server port.

It could be mitigated in an app by not using URLs in the HTML, and using only Javascript callback registrations for navigation.

In general, WebView.enableDragAndDrop seems problematical. It would need to be intelligently enabled/disabled for specific pages and further for specific items on a page.

I suggest watching Cordova, etc. to see what they do about this. It is going to be a problem for WebView-based hybrid platforms, because you do not have effective fine-grain control over page elements.

@dmitrys
Copy link
Contributor

dmitrys commented Oct 2, 2017

Currently I implemented only disable by customer request. on-time enable/disable required additional resources for this task - we implement it later.

@jtara jtara changed the title WebView.enableDragAndDrop security vulnarability WebView.enableDragAndDrop security vulnerability Oct 2, 2017
@jtara
Copy link
Author

jtara commented Oct 2, 2017

FYI, it appears you can control this within the webview.

See:

https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/SafariJSProgTopics/DragAndDrop.html

-webkit-user-drag: none CSS on or should disable it. Then you could enable for specific elements with -webkit-user-drag: element or -webkit-user-drag: auto. Or leave enabled and disable links and buttons, etc.

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

No branches or pull requests

2 participants