fix port parsing error in read_secrets
This commit is contained in:
parent
4c101585b0
commit
2c93b8d9b6
@ -6,6 +6,8 @@ ChangeLog for davfs2
|
|||||||
Do HEAD if no etag returned (regression in 1.4.0).
|
Do HEAD if no etag returned (regression in 1.4.0).
|
||||||
* mount_davfs.c, read_secrets:
|
* mount_davfs.c, read_secrets:
|
||||||
For URLs only check port if present.
|
For URLs only check port if present.
|
||||||
|
* redo the above: set port to default if not present
|
||||||
|
and check.
|
||||||
|
|
||||||
2009-05-31 Werner Baumann (werner.baumann@onlinehome.de)
|
2009-05-31 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
* cache.c, cache.h, dav_coda.c, dav_fuse.c:
|
* cache.c, cache.h, dav_coda.c, dav_fuse.c:
|
||||||
|
@ -2356,6 +2356,9 @@ read_secrets(dav_args *args, const char *filename)
|
|||||||
int port = 0;
|
int port = 0;
|
||||||
char *path = 0;
|
char *path = 0;
|
||||||
split_uri(&scheme, &host, &port, &path, parmv[0]);
|
split_uri(&scheme, &host, &port, &path, parmv[0]);
|
||||||
|
int p_port = port;
|
||||||
|
if (!port)
|
||||||
|
port = ne_uri_defaultport(scheme);
|
||||||
|
|
||||||
char *ccert = NULL;
|
char *ccert = NULL;
|
||||||
if (args->clicert) {
|
if (args->clicert) {
|
||||||
@ -2373,7 +2376,7 @@ read_secrets(dav_args *args, const char *filename)
|
|||||||
|| (scheme && args->scheme
|
|| (scheme && args->scheme
|
||||||
&& strcmp(scheme, args->scheme) == 0
|
&& strcmp(scheme, args->scheme) == 0
|
||||||
&& host && args->host && strcmp(host, args->host) == 0
|
&& host && args->host && strcmp(host, args->host) == 0
|
||||||
&& (!port || port == args->port)
|
&& port == args->port
|
||||||
&& path && args->path
|
&& path && args->path
|
||||||
&& strcmp(path, args->path) == 0)) {
|
&& strcmp(path, args->path) == 0)) {
|
||||||
|
|
||||||
@ -2392,7 +2395,7 @@ read_secrets(dav_args *args, const char *filename)
|
|||||||
} else if (strcmp(parmv[0], "proxy") == 0
|
} else if (strcmp(parmv[0], "proxy") == 0
|
||||||
|| (host && args->p_host
|
|| (host && args->p_host
|
||||||
&& strcmp(host, args->p_host) == 0
|
&& strcmp(host, args->p_host) == 0
|
||||||
&& (!port || port == args->p_port))) {
|
&& (!p_port || p_port == args->p_port))) {
|
||||||
|
|
||||||
if (args->p_user) {
|
if (args->p_user) {
|
||||||
memset(args->p_user, '\0', strlen(args->p_user));
|
memset(args->p_user, '\0', strlen(args->p_user));
|
||||||
|
Loading…
Reference in New Issue
Block a user