[ 
https://issues.apache.org/jira/browse/CB-11270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15323507#comment-15323507
 ] 

Tony Homer commented on CB-11270:
---------------------------------

This article basically says the same thing but the explanation was a little 
more clear to me:
http://tech.vg.no/2013/09/13/dissecting-javascript-clicks-in-uiwebview/

I'm not sure how to validate this, but from the description it seems like we 
could just compare documentURL and URL - if they are the same it should mean 
that the action was originated on the page.  I guess we could make an iframe on 
the page that tries to use the intent?

Based on this SO answer (which I didn't test for myself yet) it's possible to 
use javascript to get UIWebViewNavigationTypeLinkClicked anyway:
http://stackoverflow.com/a/30202988/273628

If this is true I guess we should compare documentURL and URL even for 
UIWebViewNavigationTypeLinkClicked?

> [QUESTION] Is whitelist intent filter working as intended?
> ----------------------------------------------------------
>
>                 Key: CB-11270
>                 URL: https://issues.apache.org/jira/browse/CB-11270
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>            Reporter: Tony Homer
>            Assignee: Shazron Abdullah
>
> In 3.8.0, given an intent directive like 
> {code}
> <allow-intent href="tel:*" />
> {code}
> , interacting with any of the following elements would result in tel: 
> requests that would all be allowed:
> {code}
> <a id="tel-button" href="tel:777777777">do tel with a.href</a>
> <a id="tel-a-onclick" onclick="document.location.href='tel:777777777';">do 
> tel with a.onclick</a>
> <button id="tel-button" onclick="document.location.href='tel:777777777';">do 
> tel with button.onclick</button>
> {code}
> However, in 4.1.1, only the first interaction will be allowed.
> This is because intent directives are only applied to the 
> UIWebViewNavigationTypeLinkClicked navigationType (the navigationType for the 
> second and third examples is UIWebViewNavigationTypeOther).
> Is this working as intended?
> It seems that either the whitelist intent filter in 4+ is not working as 
> intended or, if working as intended, the documentation should be improved to 
> spell out this case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to