From nobody@FreeBSD.org  Mon Jun  4 16:02:39 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7ED0416A421
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Jun 2007 16:02:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F8C613C455
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Jun 2007 16:02:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l54G2d65004569
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 4 Jun 2007 16:02:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l54G2dGD004568;
	Mon, 4 Jun 2007 16:02:39 GMT
	(envelope-from nobody)
Message-Id: <200706041602.l54G2dGD004568@www.freebsd.org>
Date: Mon, 4 Jun 2007 16:02:39 GMT
From: Bruce Cran<bruce@cran.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ftpd doesn't handle filenames which contain curly brackets
X-Send-Pr-Version: www-3.0

>Number:         113336
>Category:       bin
>Synopsis:       ftpd doesn't handle filenames which contain curly brackets
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 04 16:10:04 GMT 2007
>Closed-Date:    Wed Jun 06 00:15:59 GMT 2007
>Last-Modified:  Wed Jun 06 00:15:59 GMT 2007
>Originator:     Bruce Cran
>Release:        7.0-CURRENT
>Organization:
>Environment:
FreeBSD neutrino.draftnet 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Mon June 04
12:00:18 BST 2007     root@neutrino:/usr/obj/usr/src/sys/GENERIC  i386 
>Description:
When trying to fetch files from a server running the ftpd from /usr/libexec, ftpd apparently removes curly brackets from filenames before trying to read them from the filesystem.  For example:

command: TYPE I
<--- 200
Type set to I.
command: SIZE guid_{1234567890}_file.txt
<-- 550
guid_1234567890_file.txt: No such file or directory. 
>How-To-Repeat:
On the server:
/usr/libexec/ftpd -4 -D

On the client:
> ftp <hostname of server>
[login]
> get guid_{1234567890}_file.txt
>Fix:


>Release-Note:
>Audit-Trail:

From: Oliver Fromme <olli@lurza.secnetix.de>
To: freebsd-bugs@FreeBSD.ORG, bug-followup@FreeBSD.ORG, bruce@cran.org.uk
Cc:  
Subject: Re: misc/113336: ftpd doesn't handle filenames which contain curly ?brackets
Date: Mon, 4 Jun 2007 19:09:02 +0200 (CEST)

 Bruce Cran wrote:
  > When trying to fetch files from a server running the ftpd from
  > /usr/libexec, ftpd apparently removes curly brackets from filenames
  > before trying to read them from the filesystem.
 
 ftpd performs filename globbing, i.e. it interprets
 the wildcards "?", "*" and "[...]", and additionally
 it expands csh-like brace expressions.
 
 In other words:  What you see is expected behaviour,
 not a bug.  Try prepending a backslash in front of
 the braces, i.e.:  get guid_\{1234567890\}_file.txt
 
 (I haven't tested this ...  It might be possible that
 the FTP client removes one level of backslashes, so
 in that case you need to write two backslashes each.)
 
 Best regards
    Oliver
 
 -- 
 Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
 Handelsregister: Registergericht Muenchen, HRA 74606,  Geschftsfuehrung:
 secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
 chen, HRB 125758,  Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
 
 FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd
 
 "I learned Java 3 years before Python.  It was my language of
 choice.  It took me two weekends with Python before I was more
 productive with it than with Java." -- Anthony Roberts

From: Bruce Cran <bruce@cran.org.uk>
To: freebsd-bugs@FreeBSD.ORG,  bug-followup@FreeBSD.org, 
 olli@lurza.secnetix.de
Cc:  
Subject: Re: misc/113336: ftpd doesn't handle filenames which contain curly
 ?brackets
Date: Tue, 05 Jun 2007 12:28:48 +0100

 Oliver Fromme wrote:
 > Bruce Cran wrote:
 >  > When trying to fetch files from a server running the ftpd from
 >  > /usr/libexec, ftpd apparently removes curly brackets from filenames
 >  > before trying to read them from the filesystem.
 >
 > ftpd performs filename globbing, i.e. it interprets
 > the wildcards "?", "*" and "[...]", and additionally
 > it expands csh-like brace expressions.
 >
 > In other words:  What you see is expected behaviour,
 > not a bug.  Try prepending a backslash in front of
 > the braces, i.e.:  get guid_\{1234567890\}_file.txt
 >
 > (I haven't tested this ...  It might be possible that
 > the FTP client removes one level of backslashes, so
 > in that case you need to write two backslashes each.)
 >
 > Best regards
 >    Oliver
 >   
 
 Thanks, it works with FreeBSD's FTP client when I use two backslashes.
 
 Regards,
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Wed Jun 6 00:15:47 UTC 2007 
State-Changed-Why:  
A workaround was suggested. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113336 
>Unformatted:
