diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-25 18:14:59 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-25 18:14:59 +0000 |
commit | 90150252ad18cd756c471f4324035833ee548a2a (patch) | |
tree | bb624a6948ec338c46b8938a543f9a510466305f /etc.c | |
parent | [w3m-dev 02729] (diff) | |
download | w3m-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.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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; |