{ "id": "160056", "key": "TIMOB-23327", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-01-10T09:46:04.000+0000", "created": "2016-05-05T14:07:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Citi", "supportTeam" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" }, { "id": "17993", "description": "Release 5.2.2", "name": "Release 5.2.2", "archived": false, "released": true, "releaseDate": "2016-04-05" } ], "issuelinks": [ { "id": "51621", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "159457", "key": "TIMOB-23186", "fields": { "summary": "Android: Webview request send out beforeload event is excuted on Webview", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "53908", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "165243", "key": "TIMOB-24288", "fields": { "summary": "Deprecate \"onStopBlacklistedUrl\" WebView event in favor of cross-platform \"blacklisturl\" event", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-01-10T22:17:33.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Scenario:*\r\nCustomer's want to prevent any unauthorized request. In newly developed features we can block URL by adding blacklistedURLs property. But its only helpful if we have URL list but if we don't have any predefined URL then it will not helpful. \r\n\r\nIf stopLoading() stop loading content then customer need like stop request function which is stop sending request. \r\n\r\nJust load any HTML url in webview and call the webview.stoploading in beforeload event of webview. Customer has blocked the \"terms of use\" and \"privacy policy\" links in \"beforeload\" event of the web view. The webView stops loading but the link is traced in Proxy.\r\n\r\n*Test code:* \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'black',\r\n layout : 'vertical'\r\n});\r\n\r\nvar webview = Titanium.UI.createWebView({url:'https://en.m.wikipedia.org/wiki/Main_Page'});\r\n\r\nwebview.addEventListener('beforeload', function(e){\r\n\tTi.API.info(\"beforeload = e.url=\" + e.url);\r\n\tif(e.url.indexOf('wikimediafoundation.org/wiki/Terms_of_Use') > -1){\r\n\t\twebview.stopLoading();\r\n\t\tTi.API.info(\"Inside TERMS OF USE\");\r\n\t} else if (e.url.indexOf('wikimediafoundation.org/wiki/Privacy_policy') > -1){\r\n\t\twebview.stopLoading();\r\n\t\tTi.API.info(\"Inside privacy policy\");\r\n\t}\r\n});\r\nwebview.addEventListener('load', function(e){\r\n\tTi.API.info(\"load = e.url=\" + e.url);\r\n\t\r\n});\r\n\r\nwin.add(webview);\r\n\r\nwin.open(); \r\n{code}\r\n\r\n\r\n*Test steps:*\r\n\r\n Run test code in classic project\r\n Click on \"terms of use\" and \"privacy policy\" links and see the requests on proxy.\r\n\r\n*Expected Behavior :*\r\nWebview.stoploading should have prevented the request for the link clicked.\r\n\r\n*Actual Behavior :*\r\nBy clicking on \"terms of use\" and \"privacy policy\" links, requests are sent out on proxy(by the IP address)\r\n", "attachment": [ { "id": "59174", "filename": "Capture.PNG", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T10:52:43.000+0000", "size": 95826, "mimeType": "image/png" }, { "id": "59175", "filename": "screen_using_blacklistedurl.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T10:52:39.000+0000", "size": 231869, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Webview request send out beforeload event is excuted on Webview (Parity)", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "Titanium SDK: 5.4.0.X\r\nJava Development Kit Version: 1.8.0_73\r\nTitanium CLI Version: 5.0.5\r\nAppcelerator CLI Version: 5.2.2", "comment": { "comments": [ { "id": "385216", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Just want to check, this is for iOS, correct?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-05-10T02:01:43.000+0000", "updated": "2016-05-10T02:01:43.000+0000" }, { "id": "385354", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~apetkov] Once Ash and the rest determine the approach, can you work on this fix?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-11T02:13:32.000+0000", "updated": "2016-05-11T02:13:32.000+0000" }, { "id": "385668", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Had the call with client (Rajeev & Koushik) with Ash and Angel from our end and we came to the agreement that we will have the feature ready buy next Wednesday May18th", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-13T14:16:57.000+0000", "updated": "2016-05-13T14:16:57.000+0000" }, { "id": "386674", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello, the ticket for IOS is in progress now we've had feedback off the customers, they seem to be happy with the android implementation. The iOS feature should be finished by the end of this week, I apologize for the delay as I've been out the office and we have also been waiting on feedback of the Android implementation which seems to have gone smoothly. Again the iOS feature should be out shortly (end of this week) Thank you! ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-24T20:31:59.000+0000", "updated": "2016-05-24T20:31:59.000+0000" }, { "id": "386811", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Introduced onStopBlackListUrl\r\n* PR: https://github.com/appcelerator/titanium_mobile/pull/8019\r\n* Custom Build: https://www.dropbox.com/s/v3ol1q4tddumzhs/mobilesdk-5.4.0-osx.zip?dl=0\r\n\r\n_*Steps to Test:*_\r\nClick the 9 or iOS library link. \r\n\r\n_*Expected Result:*_\r\nNothing should open and the event should be triggered with the event data loged. \r\n\r\nDemo Code:\r\n{code:javascript}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'black',\r\n layout : 'vertical'\r\n});\r\nvar webview = Titanium.UI.createWebView({\r\n blacklistedURLs :'IOS',\r\n url : 'https://developer.apple.com/library/'\r\n});\r\n \r\nwebview.addEventListener('load', function(e) {\r\n Ti.API.warn(\"load = e.url=\" + e.url);\r\n});\r\n \r\nwebview.addEventListener('onStopBlacklistedUrl', function(e) {\r\n Ti.API.info(e);\r\n});\r\n\r\nwin.add(webview);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-25T21:53:43.000+0000", "updated": "2016-06-02T19:14:25.000+0000" }, { "id": "387039", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~morahman] Yes, my mistake I was testing the flush of the array in the demo-code and forgot to remove it before adding it to Jira. My apologizes, could you test again thank you! ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-27T17:21:04.000+0000", "updated": "2016-05-27T17:21:04.000+0000" }, { "id": "387042", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~apetkov] , [~arohini], Now it works with the updated test case.\r\n\r\nThanks.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-05-27T18:13:32.000+0000", "updated": "2016-05-27T18:14:59.000+0000" }, { "id": "387046", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks [~morahman] !!", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-27T19:13:52.000+0000", "updated": "2016-05-27T19:13:52.000+0000" }, { "id": "387135", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~morahman], Client reported that its still not working. Did you test it with the build from the link below?\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/8019\r\nCustom Build: https://www.dropbox.com/s/v3ol1q4tddumzhs/mobilesdk-5.4.0-osx.zip?dl=0", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-30T23:15:49.000+0000", "updated": "2016-06-02T19:14:45.000+0000" }, { "id": "387839", "author": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "body": "How about using `stopBlackListUrl` as event name instead of `onStopBlackListUrl`?\r\nIf `onStopBlackListUrl`, the xml has `onOnStopBlacklistedUrl ` name.\r\n{code}\r\n\r\n{code}\r\n\r\n`onOn` dosn't look good.", "updateAuthor": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2016-06-08T10:03:29.000+0000", "updated": "2016-06-08T10:03:53.000+0000" }, { "id": "387856", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~yomybaby] Hello I appreciate the feedback and agree completely that it should be called stopBlackListUrl however this ticket is just for the iOS feature. I cannot rename it within this PR as the customBuild is already being used for testing by the customers. Once this feature is merged we will create a new ticket and rename the event for both iOS and Android.", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-08T16:24:44.000+0000", "updated": "2016-06-08T16:24:44.000+0000" }, { "id": "388907", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~apetkov], Any update on the fix for this issue ?", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-23T03:19:44.000+0000", "updated": "2016-06-23T03:19:44.000+0000" }, { "id": "393940", "author": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "body": "Any news? :)", "updateAuthor": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2016-08-23T15:38:57.000+0000", "updated": "2016-08-23T15:38:57.000+0000" }, { "id": "396325", "author": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "body": "I hope that this iOS code will be merged soon. \r\nPlease :)\r\nBecause Android has this feature already in 5.4.0.GA.\r\n", "updateAuthor": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2016-09-16T07:27:29.000+0000", "updated": "2016-09-16T07:28:05.000+0000" }, { "id": "403839", "author": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "body": "this property for Android was included 5.4.0!\r\nNot yet on iOS.\r\n@apetkov Is there any reason? :)", "updateAuthor": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2016-12-23T02:05:37.000+0000", "updated": "2016-12-23T02:05:37.000+0000" }, { "id": "404275", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] PR: https://github.com/appcelerator/titanium_mobile/pull/8732\r\n\r\nTest code -\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'black',\r\n layout : 'vertical'\r\n});\r\nvar webview = Titanium.UI.createWebView({\r\n url : 'https://developer.apple.com/library/'\r\n});\r\n \r\n webview.setBlacklistedURLs(['library']);\r\n \r\nwebview.addEventListener('load', function(e) {\r\n Ti.API.warn(\"load = e.url=\" + e.url);\r\n});\r\n \r\nwebview.addEventListener('onStopBlacklistedUrl', function(e) {\r\n Ti.API.info(e);\r\n});\r\n \r\nwin.add(webview);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-09T09:36:41.000+0000", "updated": "2017-01-09T09:37:48.000+0000" }, { "id": "404402", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified improvement with the test case provided by [~vijaysingh] application was no longer displaying the blacklisted URL. \r\n\r\n*Environment*\r\n{code:java}\r\nAppcelerator Command-Line Interface, version 6.1.0\r\niphone 6 plus (ios 9.3.4)\r\nOperating System Name: Mac OS X El Capitan\r\nOperating System Version: 10.11.6\r\nNode.js Version: 4.6.0\r\nnpm: 4.2.8\r\nTitanium SDK Version: 6.1.0.v20170110133045\r\nXcode: 8.2\r\nAppcelerator Studio: 4.8.1.201612050850\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-10T22:16:26.000+0000", "updated": "2017-01-10T22:16:26.000+0000" } ], "maxResults": 34, "total": 34, "startAt": 0 } } }