Similar bug to FTPServer-61 found using passwords with not-utf8 characters
--------------------------------------------------------------------------

                 Key: FTPSERVER-283
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-283
             Project: FtpServer
          Issue Type: Bug
          Components: Core
         Environment: AIX 5.3 64 bit
            Reporter: salahzar stenvaag


When specifying a password (PASS command) with special characters like spanish 
cedilla we found malformed input exception (see after).

A very similar error has been reported in the past using filenames with special 
characters 

==>FTPServer-61<==

 but the jira had been dismissed because it was assumed (if I understood 
correctly) that client libraries should have specified UTF8 encoding, but if we 
are using standard clients it is very difficult... As I saw from 
http://ftp-software-review.toptenreviews.com/ only smartftp is able to specify 
utf-8 for transferring files...

Wouldn't it be possible to patch ftpserver to handle commands channel without 
incurring in such nasty low level exception, and decode them using a list of 
configurable encodings  (utf8, if it fails ISO-8859-2 and so on)?
 Or some tricks to use standard clients letting them specify utf8?

Thanks for any hint you can offer to this.


2009-03-27 13:36:31,672 [pool-1-thread-1] WARN  LoggingFilter  - EXCEPTION: 
org.apache.mina.filter.codec.ProtocolDecoderException: 
java.nio.charset.MalformedInputException: Input length = 2 (Hexdump: 50 41 53 
53 20 72 46 30 67 40 E7 61 0D 0A)
        at 
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:180)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
        at 
org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:60)
        at org.apache.mina.core.session.IoEvent.run(IoEvent.java:64)
        at 
org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:551)
        at 
org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:543)
        at 
org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:487)
        at java.lang.Thread.run(Thread.java:810)
Caused by: 
java.nio.charset.MalformedInputException: Input length = 2
        at java.nio.charset.CoderResult.throwException(CoderResult.java:283)
        at 
org.apache.mina.core.buffer.AbstractIoBuffer.getString(AbstractIoBuffer.java:1122)
        at 
org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:207)
        at 
org.apache.mina.filter.codec.textline.TextLineDecoder.decode(TextLineDecoder.java:138)
        at 
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:170)
        ... 9 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to