[TIMOB-5863] Android: Missing null/undefined checks for some functions in android/modules/utils/UtilsModule.java
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-07-10T22:46:24.000+0000 |
| Affected Version/s | Release 1.8.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | n/a |
| Reporter | Ping Wang |
| Assignee | Ingo Muschenetz |
| Created | 2011-10-25T16:20:33.000+0000 |
| Updated | 2017-07-10T22:46:24.000+0000 |
Description
In android/modules/utils/UtilsModule.java, some functions take a string as an argument but don't have null/undefined checks. Therefore it will crash by running:
Ti.Utils.sha1(null);
or
Ti.Utils.sha1(undefined);
Ti.Utils.base64encode(null);
Ti.Utils.base64decode(null);
Ti.Utils.base64decode(undefined);
Ti.Utils.md5HexDigest(null);
Ti.Utils.md5HexDigest(undefined);
Ti.Utils.sha1(null);
Ti.Utils.sha1(undefined);
Attachments
| File | Date | Size |
|---|---|---|
| app.js | 2011-10-25T17:19:31.000+0000 | 204 |
Fixed in the pull request https://github.com/appcelerator/titanium_mobile/pull/618
Closing ticket as fixed.