lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV ~ -> $HOME in local URLs


From: Foteos Macrides
Subject: Re: LYNX-DEV ~ -> $HOME in local URLs
Date: Thu, 12 Jun 1997 16:59:15 -0500 (EST)

"John E. Davis" <address@hidden> wrote:
>On Thu, 12 Jun 1997 06:46:00 -0700 (PDT), Mike Brown <address@hidden> said:
>>> There's a very annoying bug in lynx 2.6 and 2.7: "~"s anywhere in
>>> local URLs get substituted by $HOME, so that, for example,
>>
>>It is not a bug, and has nothing to do with Lynx, actually.  Your shell
>>parses the line and makes filename substiutions before executing the
>>command. Quoting to defeat filename substituation by the shell is a
>>tricky business sometimes.  If you put the URL in "quotes" you shouldn't
>>have a problem.
>
>This must be shell dependent.  For example, tcsh only expands ~ if it
>is the first character:
>
>[11:45am] /nfs/wiwaxia/h1/davis>echo ~
>/nfs/wiwaxia/h1/davis
>[11:45am] /nfs/wiwaxia/h1/davis>echo ~davis
>/nfs/wiwaxia/h1/davis/davis
>[11:45am] /nfs/wiwaxia/h1/davis>echo X~
>X~
>[11:45am] /nfs/wiwaxia/h1/davis>echo http://~davis
>http://~davis
>
>So, if the shell is tcsh, the quoting is not necessary.

        It's being done in LYSanctify() if you are on Unix and have
DIRED_SUPPORT defined, and in the homologous code (following the
#else in LYGetFile.c) if you are not on Unix, or are but don't have
DIRED_SUPPORT defined.  If there are no Unix shells which  convert
the tilde to $HOME when it does not begin the path, or immediately
follows the lead slash of a path, that code could be changed so that
the translation occurs only when it is the lead symbolic element of
the URL's path.  However, "~davis" instead of just '~' as the lead
symbolic element should still be sabatoged for file URLs, which is
LYSanctify()'s and the alternate code's intent, because you only
need '~' if you're running Lynx in the "davis" account, and it
has heretofore been considered a security risk to honor file URLs
for other accounts unless an expanded path was used in the first
place ("Gee, I know John Davis is on this machine, and I wonder if
I can get Lynx to give me a directory listing of his account, so I
can poke around in it and see if it has any juicy files he should
have protected, but didn't!").

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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