[MOD-2560] Saving strings 64 characters or greater to Android keychain breaks
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-01-23T23:18:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | griffin-app, ti.identity |
Reporter | Brenton House |
Assignee | Gary Mathews |
Created | 2019-12-12T14:43:33.000+0000 |
Updated | 2020-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] }
master: https://github.com/appcelerator-modules/titanium-identity/pull/44