Bug 18365

Summary: ftpd doesn't escape double quotes in PWD result
Product: Base System Reporter: sandy <sandy>
Component: miscAssignee: Yar Tikhiy <yar>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description sandy 2000-05-03 10:30:01 UTC
If a directory name contains a `"' character, then ftpd should escape
the `"' by doubling it to `""'. (See App. II in RFC 959.)
It doesn't do this.

If I CWD in FTP to a directory /home/sandy/f"f and type pwd, then
ftpd should return

  257 "/home/sandy/f""f" is current working directory

according to App. II in RFC 959.  The ftpd distributed with FreeBSD
returns

  257 "/home/sandy/f"f" is current working directory

instead.

Fix: 

A straight-forward little function in ftpd.c is required to double `"'
characters in the return string from getcwd().
Comment 1 Yar Tikhiy freebsd_committer freebsd_triage 2002-07-22 08:41:33 UTC
State Changed
From-To: open->patched

Fixed in CURRENT.  MFC pending.  Thanks! 


Comment 2 Yar Tikhiy freebsd_committer freebsd_triage 2002-07-22 08:41:33 UTC
Responsible Changed
From-To: freebsd-bugs->yar

MFC reminder.
Comment 3 Yar Tikhiy freebsd_committer freebsd_triage 2002-07-29 21:18:04 UTC
State Changed
From-To: patched->closed

Fixed in -CURRENT & -STABLE, thanks!