summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-07 15:40:29 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-07 15:40:29 +0200
commit5b1f3237c1cc181d216a02ce604614adb792aa17 (patch)
tree649665eda3bfc6c9c3a1949a9b9a2fa4a3472969 /src
parentd2a391c693c0b1bcd9c5eda132f51be7991db189 (diff)
account: handle URL-encoded passwords (fixes #273)
Diffstat (limited to 'src')
-rw-r--r--src/account.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/account.c b/src/account.c
index e23d5c8..c3f26eb 100644
--- a/src/account.c
+++ b/src/account.c
@@ -396,7 +396,9 @@ int account_alloc(struct account **accp, const char *sipaddr)
goto out;
}
else {
- err = pl_strdup(&acc->auth_pass, &acc->laddr.uri.password);
+ err = re_sdprintf(&acc->auth_pass, "%H",
+ uri_password_unescape,
+ &acc->laddr.uri.password);
if (err)
goto out;
}