#682 assigned defect

FTP frontend refuses accents — at Version 12

Reported by: arthur Owned by: francois
Priority: major Milestone: soon
Component: code-frontend-ftp-sftp Version: 1.3.0
Keywords: i18n unicode ftpd names twisted Cc: amontero@…
Launchpad Bug:

Description (last modified by davidsarah)

using ncftp on a put of a file with an é accent I get the following message :

[Requested action not taken: internal server error]

in the logs server side :

2009-04-17 15:22:07+0200 [ProtocolWrapper,3,127.0.0.1] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line 362, in doRead
            return self.protocol.dataReceived(data)
          File "/usr/lib/python2.5/site-packages/twisted/protocols/policies.py", line 72, in dataReceived
            self.wrappedProtocol.dataReceived(data)
          File "/usr/lib/python2.5/site-packages/twisted/protocols/basic.py", line 231, in dataReceived
            why = self.lineReceived(line)
          File "/usr/lib/python2.5/site-packages/twisted/protocols/ftp.py", line 698, in lineReceived
            d = defer.maybeDeferred(self.processCommand, cmd, *args)
        --- <exception caught here> ---
          File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 106, in maybeDeferred
            result = f(*args, **kw)
          File "/usr/lib/python2.5/site-packages/twisted/protocols/ftp.py", line 729, in processCommand
            return method(*params)
          File "/usr/lib/python2.5/site-packages/twisted/protocols/ftp.py", line 1079, in ftp_STOR
            d = self.shell.openForWriting(newsegs)
          File "/usr/lib/python2.5/site-packages/allmydata/frontends/ftpd.py", line 255, in openForWriting
            path = [unicode(p) for p in path]
        exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 21: ordinal not in range(128)

Change History (12)

comment:1 Changed at 2009-04-23T10:05:58Z by francois

  • Milestone changed from undecided to 1.5.0
  • Owner changed from nobody to francois

This is definitely the same sort of encoding issues as in #534. I'll try to have a look at it.

comment:2 Changed at 2009-04-23T10:06:02Z by francois

  • Status changed from new to assigned

comment:3 Changed at 2009-06-30T17:16:35Z by zooko

  • Milestone changed from 1.5.0 to eventually

comment:4 Changed at 2009-07-11T11:28:04Z by warner

  • Component changed from unknown to code-frontend
  • Description modified (diff)

reformatted description slightly

comment:5 Changed at 2009-11-23T02:37:56Z by davidsarah

  • Keywords i18n unicode added

comment:6 Changed at 2010-01-15T02:39:15Z by davidsarah

  • Keywords ftp added

comment:7 follow-up: Changed at 2010-01-15T02:41:01Z by davidsarah

See RFC 2640 for FTP internationalization.

comment:8 Changed at 2010-02-07T16:43:48Z by davidsarah

  • Keywords ftpd added; ftp removed

comment:9 in reply to: ↑ 7 Changed at 2010-06-15T23:41:39Z by davidsarah

Replying to davidsarah:

See RFC 2640 for FTP internationalization.

Summary:

  • include UTF8 in the response to a FEAT request;
  • use UTF-8;
  • reject filenames that are not valid UTF-8.

Admirably simple :-)

(See also #1076 about normalization, but that will probably be done in the dirnode interface rather than in frontends.)

comment:10 Changed at 2010-06-15T23:50:30Z by davidsarah

Hmm, judging by the exception message ("'ascii' codec can't decode byte 0xe0"), ncftp was trying to use ISO-Latin-1 rather than UTF-8. But at least it would be possible for clients to do the right thing, so I still think we should implement RFC 2640.

comment:11 Changed at 2010-06-15T23:57:51Z by davidsarah

Actually 'é' is 0xE9 in ISO-Latin-1, so I don't know what encoding this was (but not UTF-8).

comment:12 Changed at 2010-06-15T23:59:14Z by davidsarah

  • Description modified (diff)
Note: See TracTickets for help on using tickets.