mirror of https://github.com/keeweb/keeweb.git
fix #631: unicode characters in Dropbox files
This commit is contained in:
parent
245662a941
commit
145aa4bac4
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue