[w3m-dev 02732] fix Debian Bug#126381 - Passwords entered for HTTPS are used for HTTP
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
This commit is contained in:
1 parent
403031b581
commit
90150252ad
6 files changed
+35
-18
No files matched your search
@@ -1,3 +1,18 @@
|
|||||||
|
2001-12-26 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
|
||||||
|
|
||||||
|
* [w3m-dev 02732] fix Debian Bug#126381
|
||||||
|
- Passwords entered for HTTPS are used for HTTP
|
||||||
|
* etc.c (find_auth): add port arg
|
||||||
|
* etc.c (find_auth_cookie): add port arg
|
||||||
|
* etc.c (add_auth_cookie): add port arg
|
||||||
|
* file.c (getAuthCookie): find_auth_cookie(host, port, realm)
|
||||||
|
* file.c (loadGeneralFile): add_auth_cookie(host, port, realm, ss)
|
||||||
|
* fm.h (struct auth_cookie): add port
|
||||||
|
* ftp.c (openFTP): find_auth_cookie(host, port, user)
|
||||||
|
* ftp.c (openFTP): add_auth_cookie(host, port, user, pwd)
|
||||||
|
* proto.h (find_auth_cookie): add port
|
||||||
|
* proto.h (add_auth_cookie): add port
|
||||||
|
|
||||||
2001-12-26 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
|
2001-12-26 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev 02729]
|
* [w3m-dev 02729]
|
||||||
@@ -1578,4 +1593,4 @@
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.176 2001/12/25 17:29:31 ukai Exp $
|
$Id: ChangeLog,v 1.177 2001/12/25 18:14:59 ukai Exp $
|
||||||
@@ -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 "fm.h"
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -888,39 +888,40 @@ correct_irrtag(int status)
|
|||||||
|
|
||||||
/* authentication */
|
/* authentication */
|
||||||
struct auth_cookie *
|
struct auth_cookie *
|
||||||
find_auth(char *host, char *realm)
|
find_auth(char *host, int port, char *realm)
|
||||||
{
|
{
|
||||||
struct auth_cookie *p;
|
struct auth_cookie *p;
|
||||||
|
|
||||||
for (p = Auth_cookie; p != NULL; p = p->next) {
|
for (p = Auth_cookie; p != NULL; p = p->next) {
|
||||||
if (!Strcasecmp_charp(p->host, host) &&
|
if (!Strcasecmp_charp(p->host, host) &&
|
||||||
!Strcasecmp_charp(p->realm, realm))
|
p->port == port && !Strcasecmp_charp(p->realm, realm))
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Str
|
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)
|
if (p)
|
||||||
return p->cookie;
|
return p->cookie;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
struct auth_cookie *p;
|
||||||
|
|
||||||
p = find_auth(host, realm);
|
p = find_auth(host, port, realm);
|
||||||
if (p) {
|
if (p) {
|
||||||
p->cookie = cookie;
|
p->cookie = cookie;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
p = New(struct auth_cookie);
|
p = New(struct auth_cookie);
|
||||||
p->host = Strnew_charp(host);
|
p->host = Strnew_charp(host);
|
||||||
|
p->port = port;
|
||||||
p->realm = Strnew_charp(realm);
|
p->realm = Strnew_charp(realm);
|
||||||
p->cookie = cookie;
|
p->cookie = cookie;
|
||||||
p->next = Auth_cookie;
|
p->next = Auth_cookie;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: file.c,v 1.33 2001/12/25 16:49:42 ukai Exp $ */
|
/* $Id: file.c,v 1.34 2001/12/25 18:15:00 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -901,7 +901,7 @@ getAuthCookie(char *realm, char *auth_header, TextList *extra_header,
|
|||||||
* extra_header */
|
* extra_header */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ss = find_auth_cookie(pu->host, realm);
|
ss = find_auth_cookie(pu->host, pu->port, realm);
|
||||||
if (ss == NULL) {
|
if (ss == NULL) {
|
||||||
/* input username and password */
|
/* input username and password */
|
||||||
sleep(2);
|
sleep(2);
|
||||||
@@ -1203,7 +1203,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
|
|||||||
}
|
}
|
||||||
if (add_auth_cookie_flag)
|
if (add_auth_cookie_flag)
|
||||||
/* If authorization is required and passed */
|
/* If authorization is required and passed */
|
||||||
add_auth_cookie(pu.host, realm->ptr, ss);
|
add_auth_cookie(pu.host, pu.port, realm->ptr, ss);
|
||||||
if (status == HTST_CONNECT) {
|
if (status == HTST_CONNECT) {
|
||||||
of = &f;
|
of = &f;
|
||||||
goto load_doc;
|
goto load_doc;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: fm.h,v 1.32 2001/12/25 16:19:29 ukai Exp $ */
|
/* $Id: fm.h,v 1.33 2001/12/25 18:15:00 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* w3m: WWW wo Miru utility
|
* w3m: WWW wo Miru utility
|
||||||
*
|
*
|
||||||
@@ -537,6 +537,7 @@ struct html_feed_environ {
|
|||||||
|
|
||||||
struct auth_cookie {
|
struct auth_cookie {
|
||||||
Str host;
|
Str host;
|
||||||
|
int port;
|
||||||
Str realm;
|
Str realm;
|
||||||
Str cookie;
|
Str cookie;
|
||||||
struct auth_cookie *next;
|
struct auth_cookie *next;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: ftp.c,v 1.8 2001/11/29 10:22:58 ukai Exp $ */
|
/* $Id: ftp.c,v 1.9 2001/12/25 18:15:00 ukai Exp $ */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <Str.h>
|
#include <Str.h>
|
||||||
@@ -420,7 +420,7 @@ openFTP(ParsedURL *pu)
|
|||||||
if (pu->pass)
|
if (pu->pass)
|
||||||
pass = pu->pass;
|
pass = pu->pass;
|
||||||
else if (pu->user) {
|
else if (pu->user) {
|
||||||
pwd = find_auth_cookie(pu->host, pu->user);
|
pwd = find_auth_cookie(pu->host, pu->port, pu->user);
|
||||||
if (pwd == NULL) {
|
if (pwd == NULL) {
|
||||||
if (fmInitialized) {
|
if (fmInitialized) {
|
||||||
term_raw();
|
term_raw();
|
||||||
@@ -450,7 +450,7 @@ openFTP(ParsedURL *pu)
|
|||||||
if (FtpError(s))
|
if (FtpError(s))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (add_auth_cookie_flag)
|
if (add_auth_cookie_flag)
|
||||||
add_auth_cookie(pu->host, pu->user, pwd);
|
add_auth_cookie(pu->host, pu->port, pu->user, pwd);
|
||||||
if (pu->file == NULL || *pu->file == '\0')
|
if (pu->file == NULL || *pu->file == '\0')
|
||||||
goto ftp_dir;
|
goto ftp_dir;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: proto.h,v 1.19 2001/12/25 13:43:51 ukai Exp $ */
|
/* $Id: proto.h,v 1.20 2001/12/25 18:15:00 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* This file was automatically generated by version 1.7 of cextract.
|
* This file was automatically generated by version 1.7 of cextract.
|
||||||
* Manual editing not recommended.
|
* Manual editing not recommended.
|
||||||
@@ -470,8 +470,8 @@ extern Buffer *dirBuffer(char *dirname);
|
|||||||
extern void set_environ(char *var, char *value);
|
extern void set_environ(char *var, char *value);
|
||||||
extern FILE *localcgi_post(char *, char *, FormList *, char *);
|
extern FILE *localcgi_post(char *, char *, FormList *, char *);
|
||||||
extern FILE *localcgi_get(char *, char *, char *);
|
extern FILE *localcgi_get(char *, char *, char *);
|
||||||
extern Str find_auth_cookie(char *host, char *realm);
|
extern Str find_auth_cookie(char *host, int port, char *realm);
|
||||||
extern void add_auth_cookie(char *host, char *realm, Str cookie);
|
extern void add_auth_cookie(char *host, int port, char *realm, Str cookie);
|
||||||
extern char *last_modified(Buffer *buf);
|
extern char *last_modified(Buffer *buf);
|
||||||
extern Str romanNumeral(int n);
|
extern Str romanNumeral(int n);
|
||||||
extern Str romanAlphabet(int n);
|
extern Str romanAlphabet(int n);
|
||||||
|
|||||||
Reference in new issue
Block a user