1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

normalize boolean type values for custom fields

This commit is contained in:
Kyle Spearrin 2018-12-13 10:58:48 -05:00
parent 6a958afd16
commit 18ac2db323

View File

@ -211,6 +211,10 @@ export class CipherService implements CipherServiceAbstraction {
async encryptField(fieldModel: FieldView, key: SymmetricCryptoKey): Promise<Field> {
const field = new Field();
field.type = fieldModel.type;
// normalize boolean type field values
if (fieldModel.type === FieldType.Boolean && fieldModel.value !== 'true') {
fieldModel.value = 'false';
}
await this.encryptObjProperty(fieldModel, field, {
name: null,