[TIMOB-23475] Android: read-only properties with no setter are writable/delete-able
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-06-06T04:23:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.0.0 |
Components | Android |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2016-06-03T18:41:15.000+0000 |
Updated | 2016-09-15T20:58:00.000+0000 |
Description
Properties like apiName on all proxies, or Ti.App.version are marked as read-only properties in our docs. That means the user should not be able to overwrite their values or delete them. However you currently can:
Ti.API.info('original version:' + Ti.App.version);
Ti.App.version = 'my own very special string';
Ti.API.info('modified version:' + Ti.App.version);
delete Ti.App.version;
Ti.API.info('deleted version:' + Ti.App.version);
Verified the fix. The read-only properties are no longer writable/deletable. Closing. Environment: Appc Studio : 4.8.0.201609061702 Ti SDK : 6.0.0.v20160913184210 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.8-6 Appc CLI : 6.0.0-38 Node: 4.4.4 Nexus 6 - Android 6.0.1