Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2560] Saving strings 64 characters or greater to Android keychain breaks

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-01-23T23:18:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsgriffin-app, ti.identity
ReporterBrenton House
AssigneeGary Mathews
Created2019-12-12T14:43:33.000+0000
Updated2020-01-23T23:18:11.000+0000

Description

There is an issue that I have tracked down to KeychainItem.save() for Android in https://github.com/appcelerator-modules/titanium-identity It seems that it is saving OK but when I call read(), I am getting success: false if the length of the string is perhaps too long? I don't see anything about this from anyone else and it is working fine on iOS. After some experimentation, it seems that is you save a string of 64 characters or greater you can no longer read from that keychain item and get this:
[DEBUG] obj: {
[DEBUG] "type": "read",
[DEBUG] "source": {
[DEBUG] "accessControlMode": 0,
[DEBUG] "accessibilityMode": 0,
[DEBUG] "identifier": "password",
[DEBUG] "cipher": "AES/CBC/PKCS7Padding",
[DEBUG] "apiName": "ti.touchid.KeychainItem",
[DEBUG] "bubbleParent": true,
[DEBUG] "_events": {
[DEBUG] "read": {}
[DEBUG] }
[DEBUG] },
[DEBUG] "error": null,
[DEBUG] "identifier": "password",
[DEBUG] "bubbles": false,
[DEBUG] "success": false,
[DEBUG] "code": -1,
[DEBUG] "cancelBubble": false
[DEBUG] }

Comments

  1. Gary Mathews 2019-12-19

    master: https://github.com/appcelerator-modules/titanium-identity/pull/44

JSON Source