标签:
该漏洞的描述见链接文章:http://www.cnxhacker.com/2015/01/07/5603.html.
不对外暴露:应设置android:exported="false",如: |
<activity
android:name=".HomeActivity" android:exported="false"> |
<intent-filter> |
<action
android:name="android.intent.action.VIEW" /> |
<data
android:scheme="http" android:host="m.taobao.com" android:path="/index.htm" /> |
<category
android:name="android.intent.category.DEFAULT" /> |
</intent-filter> |
</activity> |
2.
对外部暴露:需要从非手淘的其它App(含二方、三方)中通过URL方式唤起。应设置android:exported="true",且含有配置了URL规则的<intent-filter>,如: |
<activity
android:name=".HomeActivity" android:exported="true"> |
<intent-filter> |
<action
android:name="android.intent.action.VIEW" /> |
<data
android:scheme="http" android:host="m.taobao.com" android:path="/index.htm" /> |
<category
android:name="android.intent.category.DEFAULT" /> |
</intent-filter> |
</activity> |
3.
浏览器可跳入:在浏览器中访问到与URL规则匹配的网址时,浏览器将弹出选择提示,用户可选择使用手淘App或是继续用浏览器打开。由于存在一定的用户叨扰,所以须慎用,控制在尽可能小的范围内。 |
设置
android:exported="true",并在URL规则
的<intent-filter> 中添加BROWSABLE这个category,如: |
<activity
android:name=".HomeActivity" android:exported="true"> |
<intent-filter> |
<action
android:name="android.intent.action.VIEW" /> |
<data
android:scheme="http" android:host="m.taobao.com" android:path="/index.htm" /> |
<category
android:name="android.intent.category.DEFAULT" /> |
<category
android:name="android.intent.category.BROWSABLE" /> |
</intent-filter> |
</activity> |
标签:
原文地址:http://blog.csdn.net/yuanyl/article/details/43703013