Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5863] Android: Missing null/undefined checks for some functions in android/modules/utils/UtilsModule.java

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2017-07-10T22:46:24.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterPing Wang
AssigneeIngo Muschenetz
Created2011-10-25T16:20:33.000+0000
Updated2017-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

FileDateSize
app.js2011-10-25T17:19:31.000+0000204

Comments

  1. Ping Wang 2011-11-02

    Fixed in the pull request https://github.com/appcelerator/titanium_mobile/pull/618
  2. Lee Morris 2017-07-10

    Closing ticket as fixed.

JSON Source