From 25999cbbc8c0d9d2803105dcc42199bd8a10b57d Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 8 Apr 2003 16:01:37 +0000 Subject: [w3m] local cookie string is too easy to guess. * fm.h (Local_cookie): deleted * local.c (Local_cookie): static (writeLocalCookie): localCookie() (setLocalCookie): deleted (localCookie): added * main.c (main): delete srand48(), setLocalCookie() (adBmark): s/Local_cookie/localCookie()/ * proto.h (setLocalCookie): deleted (localCookie): added * rc.c (load_option_panel): s/Local_cookie/localCookie()/ From: Hironori SAKAMOTO --- main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7b26a21..fa5a00b 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.221 2003/04/07 15:24:01 ukai Exp $ */ +/* $Id: main.c,v 1.222 2003/04/08 16:01:39 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -369,8 +369,6 @@ main(int argc, char **argv, char **envp) prepare_sys_errlist(); #endif /* not HAVE_SYS_ERRLIST */ - srand48(time(0)); - NO_proxy_domains = newTextList(); fileToDelete = newTextList(); @@ -742,7 +740,6 @@ main(int argc, char **argv, char **envp) #ifdef USE_COOKIE initCookie(); #endif /* USE_COOKIE */ - setLocalCookie(); /* setup cookie for local CGI */ #ifdef USE_HISTORY if (UseHistory) loadHistory(URLHist); @@ -4009,7 +4006,7 @@ adBmark(void) FormList *request; tmp = Sprintf("mode=panel&cookie=%s&bmark=%s&url=%s&title=%s", - (Str_form_quote(Local_cookie))->ptr, + (Str_form_quote(localCookie()))->ptr, (Str_form_quote(Strnew_charp(BookmarkFile)))->ptr, (Str_form_quote(parsedURL2Str(&Currentbuf->currentURL)))-> ptr, -- cgit v1.2.3