diff --git a/app/scripts/storage/storage-dropbox.js b/app/scripts/storage/storage-dropbox.js index 0416222f..f5dd90c9 100644 --- a/app/scripts/storage/storage-dropbox.js +++ b/app/scripts/storage/storage-dropbox.js @@ -168,6 +168,10 @@ const StorageDropbox = StorageBase.extend({ return '/' + fileName + '.kdbx'; }, + _encodeJsonHttpHeader(json) { + return json.replace(/[\u007f-\uffff]/g, c => '\\u' + ('000' + c.charCodeAt(0).toString(16)).slice(-4)); + }, + _apiCall: function(args) { this._oauthAuthorize(err => { if (err) { @@ -177,7 +181,7 @@ const StorageDropbox = StorageBase.extend({ let headers; let data = args.data; if (args.apiArg) { - headers = { 'Dropbox-API-Arg': JSON.stringify(args.apiArg) }; + headers = { 'Dropbox-API-Arg': this._encodeJsonHttpHeader(JSON.stringify(args.apiArg)) }; if (args.data) { headers['Content-Type'] = 'application/octet-stream'; } diff --git a/release-notes.md b/release-notes.md index 0c75f457..19de75fa 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,8 @@ Release notes ------------- +##### v1.5.1 (TBD) +`-` fix #631: unicode characters in Dropbox files + ##### v1.5.0 (2015-05-20) `+` plugins `*` translations are available only as plugins