aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorrr-2016-09-24 08:49:47 +0200
committerrr-2016-09-24 08:49:47 +0200
commit4f497d311a5b2044a36e5beb6ac6da1e4a0ba8e2 (patch)
tree3f3af5db25d97d0679a73e118a892fec23aaed8c /client
parent01fadd8f8c97c87b31424d0f33b7c0e0580c3231 (diff)
client/api: support Unicode passwords
Diffstat (limited to 'client')
-rw-r--r--client/js/api.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/js/api.js b/client/js/api.js
index e2932f2..535b880 100644
--- a/client/js/api.js
+++ b/client/js/api.js
@@ -84,7 +84,10 @@ class Api extends events.EventTarget {
if (this.userName && this.userPassword) {
req.auth(
this.userName,
- this.userPassword);
+ encodeURIComponent(this.userPassword)
+ .replace(/%([0-9A-F]{2})/g, (match, p1) => {
+ return String.fromCharCode('0x' + p1);
+ }));
}
} catch (e) {
reject({

© 2015 - 2026 Jakob L. Kreuze