aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-25 18:14:59 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-25 18:14:59 +0000
commit90150252ad18cd756c471f4324035833ee548a2a (patch)
treebb624a6948ec338c46b8938a543f9a510466305f /etc.c
parent[w3m-dev 02729] (diff)
downloadw3m-90150252ad18cd756c471f4324035833ee548a2a.tar.gz
w3m-90150252ad18cd756c471f4324035833ee548a2a.zip
[w3m-dev 02732] fix Debian Bug#126381 - Passwords entered for HTTPS are used for HTTP
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
Diffstat (limited to 'etc.c')
-rw-r--r--etc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/etc.c b/etc.c
index 9d48e09..c7596e2 100644
--- a/etc.c
+++ b/etc.c
@@ -1,4 +1,4 @@
-/* $Id: etc.c,v 1.14 2001/12/25 16:49:42 ukai Exp $ */
+/* $Id: etc.c,v 1.15 2001/12/25 18:15:00 ukai Exp $ */
#include "fm.h"
#include <pwd.h>
#include "myctype.h"
@@ -888,39 +888,40 @@ correct_irrtag(int status)
/* authentication */
struct auth_cookie *
-find_auth(char *host, char *realm)
+find_auth(char *host, int port, char *realm)
{
struct auth_cookie *p;
for (p = Auth_cookie; p != NULL; p = p->next) {
if (!Strcasecmp_charp(p->host, host) &&
- !Strcasecmp_charp(p->realm, realm))
+ p->port == port && !Strcasecmp_charp(p->realm, realm))
return p;
}
return NULL;
}
Str
-find_auth_cookie(char *host, char *realm)
+find_auth_cookie(char *host, int port, char *realm)
{
- struct auth_cookie *p = find_auth(host, realm);
+ struct auth_cookie *p = find_auth(host, port, realm);
if (p)
return p->cookie;
return NULL;
}
void
-add_auth_cookie(char *host, char *realm, Str cookie)
+add_auth_cookie(char *host, int port, char *realm, Str cookie)
{
struct auth_cookie *p;
- p = find_auth(host, realm);
+ p = find_auth(host, port, realm);
if (p) {
p->cookie = cookie;
return;
}
p = New(struct auth_cookie);
p->host = Strnew_charp(host);
+ p->port = port;
p->realm = Strnew_charp(realm);
p->cookie = cookie;
p->next = Auth_cookie;