{ "id": "61668", "key": "TIMOB-1036", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11234", "name": "Release 1.6.0 M01", "archived": true, "released": true, "releaseDate": "2010-12-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:55:01.000+0000", "created": "2011-04-15T02:42:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0", "security" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:55:01.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

This is a security issue. Titanium APIs should only be allowed\nfor local urls

{html}", "attachment": [], "flagged": false, "summary": "Android: WebView Exposes Ti Methods with Remote URL", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124617", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [12d7bf6a90db72fa0aebe538c95128c8a0cdc625])\nInject our Ti JS and JSON near beginning of local (and ONLY local)\nhtml file contents or html set directly via the html property.\n[#2153 state:fixed-in-qa][#2514\nstate:fixed-in-qa][#1635 state:fixed-in-qa][#1036\nstate:fixed-in-qa] \nhttps://github.com/appcelerator/titanium_mobile/commit/12d7bf6a90db...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:42:03.000+0000", "updated": "2011-04-15T02:42:03.000+0000" }, { "id": "124618", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

reopening for test case

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:42:04.000+0000", "updated": "2011-04-15T02:42:04.000+0000" }, { "id": "124619", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

QA to test this, put this code in for a window JS:

\n
\nvar win = Ti.UI.currentWindow;\nvar wv = Ti.UI.createWebView({url: 'http://www.google.com'});\nwv.addEventListener('load', function(e) {\n    alert(wv.evalJS('Titanium'));\n});\nwin.add(wv);\n
\n

You should get an empty alert, because Titanium should not be\navailable if you've browed to an external site such as google in\nthis example.

\n

Note: if you try to test the fail case, be sure to try a version\nof the sdk from before 12/13/2010, otherwise #2583 will\nhappen to you and you'll get a lockup.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:42:04.000+0000", "updated": "2011-04-15T02:42:04.000+0000" }, { "id": "124620", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [a15892512a6eb0f7605a3a98615513e3f554ebde])\n[#1036 state:fixed-in-qa] Drillbit test to be\nsure Ti/Titanium not available in external web sites\n\nhttps://github.com/appcelerator/titanium_mobile/commit/a15892512a6e...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:42:04.000+0000", "updated": "2011-04-15T02:42:04.000+0000" }, { "id": "124621", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

2.2.1 (G2), 1.6 (G1) Titanium SDK version: 1.6.0 (01/04/11 08:01\ne49700d)

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:42:05.000+0000", "updated": "2011-04-15T02:42:05.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }