lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV Three More no_proxy Weaknesses (second thoughts)


From: pg
Subject: Re: LYNX-DEV Three More no_proxy Weaknesses (second thoughts)
Date: Sun, 8 Feb 1998 19:57:13 -0700 (MST)

In a recent note, address@hidden said:

> Date: Sun, 8 Feb 1998 18:41:53 -0700 (MST)
> 
I had second thoughts on this.  I tested it, and it
worked as I intended, but ...

> The tail-only comparison in override_proxy is overly lenient.
> For example, if there's a lynx.cfg entry:
> 
>     no_proxy:tek.com
> 
> this will erroneously (IMO) override the proxy for
> domain stortek.com, where it should override for
> stor.tek.com, but not for stortek.com, which may be
> an entirely unrelated domain.
> 
An administrator could have made this mostly work by
putting a name starting with "." in lynx.cfg:

    no_proxy:.tek.com

My patch would surely break this.  Here's the patch
with case-insensitivity, but without the check for '.'

-- gil
---------------------------------------------
diff -brc ./orig/lynxsrc/WWW/Library/Implementation/HTAccess.c 
./lynxsrc/WWW/Library/Implementation/HTAccess.c
*** ./orig/lynxsrc/WWW/Library/Implementation/HTAccess.c        Mon Nov 17 
19:09:44 1997
--- ./lynxsrc/WWW/Library/Implementation/HTAccess.c     Sun Feb  8 18:29:34 1998
***************
*** 312,318 ****
  
          if ((!templ_port || templ_port == port)  &&
              (t_len > 0  &&  t_len <= h_len  &&
!              !strncmp(Host + h_len - t_len, no_proxy, t_len))) {
              FREE(host);
              return YES;
          }
--- 312,318 ----
  
          if ((!templ_port || templ_port == port)  &&
              (t_len > 0  &&  t_len <= h_len  &&
!              !strncasecomp(Host + h_len - t_len, no_proxy, t_len))) {
              FREE(host);
              return YES;
          }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]