[jira] Commented: (FTPSERVER-183) DBUserManager and PropertiesUserManager are not storing the password in the User object after in authenticate()
[ https://issues.apache.org/jira/browse/FTPSERVER-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635691#action_12635691 ] David Latorre commented on FTPSERVER-183: - Niklas, Did you notice this issue? Is there any problem with my solution or some other problems you're foreseeing? DBUserManager and PropertiesUserManager are not storing the password in the User object after in authenticate() -- Key: FTPSERVER-183 URL: https://issues.apache.org/jira/browse/FTPSERVER-183 Project: FtpServer Issue Type: Bug Components: Core Affects Versions: 1.0-M4 Reporter: David Latorre Priority: Minor Attachments: UserManagers.patch I suppose that as a result of the change in the strategy to encrypt passwords in DBUserManager, getUserByName() -called by the authenticate() method - returns an User object with the password field unset. When trying to use the save method , this line throws a NullPointerException map.put(ATTR_PASSWORD, escapeString(passwordEncryptor.encrypt(user.getPassword(; My reason to use this method is that I call DBUserManager.save() to update the user in the database with last-login information. I'm providing a patch although maybe there's a more elegant solution. The same modification is done in PropertiesUserManager for coherence. Important Note: with my provided path , the user's password should not be included in the WHERE query of updateStatement as there's a chance that for a PasswordEncryptor, the result of passwordEncryptor.encrypt is not the same as the stored password even if matches() returns true. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (FTPSERVER-186) org.apache.ftpserver.util.IoUtils reinvent the wheel
[ https://issues.apache.org/jira/browse/FTPSERVER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrea Francia updated FTPSERVER-186: - Attachment: IoUtilsDesignJustification.patch This is the JavaDoc patch. org.apache.ftpserver.util.IoUtils reinvent the wheel Key: FTPSERVER-186 URL: https://issues.apache.org/jira/browse/FTPSERVER-186 Project: FtpServer Issue Type: Bug Reporter: Andrea Francia Attachments: IoUtilsDesignJustification.patch The IoUtils class contains some method that are already provided by commons-io library. These methods: - public final static void close(InputStream is) - public final static void close(OutputStream os) - public final static void close(Reader rd) - public final static void close(Writer wr) Should be substituted with the relevant closeQuietly() method of org.apache.commons.io.IOUtils. These methods: - public final static void copy(Reader input, Writer output, int bufferSize) - public final static void copy(InputStream input, OutputStream output, int bufferSize) Should be substitured with the relevant copy() methods of org.apache.commons.io.IOUtils. These methods: - public final static String readFully(Reader reader) throws IOException - public final static String readFully(InputStream input) throws IOException Should be substitured with the relevant toString() methods of org.apache.commons.io.IOUtils. About this mehods: - public final static void delete(File file) throws IOException I'm not sure, maybe there something in the org.apache.commons.io.FileUtils. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-186) org.apache.ftpserver.util.IoUtils reinvent the wheel
[ https://issues.apache.org/jira/browse/FTPSERVER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635692#action_12635692 ] Andrea Francia commented on FTPSERVER-186: -- There is a JavaDoc patch. If you use it please give me credit somewhere. org.apache.ftpserver.util.IoUtils reinvent the wheel Key: FTPSERVER-186 URL: https://issues.apache.org/jira/browse/FTPSERVER-186 Project: FtpServer Issue Type: Bug Reporter: Andrea Francia Attachments: IoUtilsDesignJustification.patch The IoUtils class contains some method that are already provided by commons-io library. These methods: - public final static void close(InputStream is) - public final static void close(OutputStream os) - public final static void close(Reader rd) - public final static void close(Writer wr) Should be substituted with the relevant closeQuietly() method of org.apache.commons.io.IOUtils. These methods: - public final static void copy(Reader input, Writer output, int bufferSize) - public final static void copy(InputStream input, OutputStream output, int bufferSize) Should be substitured with the relevant copy() methods of org.apache.commons.io.IOUtils. These methods: - public final static String readFully(Reader reader) throws IOException - public final static String readFully(InputStream input) throws IOException Should be substitured with the relevant toString() methods of org.apache.commons.io.IOUtils. About this mehods: - public final static void delete(File file) throws IOException I'm not sure, maybe there something in the org.apache.commons.io.FileUtils. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-185) Methods User#getAuthorities() is not used and should removed from the interface
[ https://issues.apache.org/jira/browse/FTPSERVER-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635707#action_12635707 ] David Latorre commented on FTPSERVER-185: - sorry but I can't see what's your use-case here. Can you comment on why you need your own User implementation (not extending BaseUser!) and how you are implementing it so you can respond to AuthorizationRequests but you don't have a list of Authorities you can return. Methods User#getAuthorities() is not used and should removed from the interface --- Key: FTPSERVER-185 URL: https://issues.apache.org/jira/browse/FTPSERVER-185 Project: FtpServer Issue Type: Bug Components: Ftplets Reporter: Andrea Francia As far I understand the User interface should specify how the User implementations should communicates with the ftpserver. The ftpserver doesn't known directly if a user is should be authorized to perform a specific action but it delegate this decisione to the User implementation. As I can see from the source code the method for determining if a user can perform a specific action is: public interface User { AuthorizationRequest authorize(AuthorizationRequest request); ... } So I don't see the purpose of put in the interface these methods: Authority[] getAuthorities(); Authority[] getAuthorities(Class? extends Authority clazz); These methods are not used by the ftpserver so they should not go in the interface. The interface beetween two entities should be keep simple as possible. The getAutorirhies() methods are used only by the specific implementation of User named BaseUser, another implementation of User should be free to choose another method for handling permissions. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-185) Methods User#getAuthorities() is not used and should removed from the interface
[ https://issues.apache.org/jira/browse/FTPSERVER-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635708#action_12635708 ] Niklas Gustavsson commented on FTPSERVER-185: - Let's move this discussion over to the mailing list (dev@mina.apache.org) where it is easier to participate in. Methods User#getAuthorities() is not used and should removed from the interface --- Key: FTPSERVER-185 URL: https://issues.apache.org/jira/browse/FTPSERVER-185 Project: FtpServer Issue Type: Bug Components: Ftplets Reporter: Andrea Francia As far I understand the User interface should specify how the User implementations should communicates with the ftpserver. The ftpserver doesn't known directly if a user is should be authorized to perform a specific action but it delegate this decisione to the User implementation. As I can see from the source code the method for determining if a user can perform a specific action is: public interface User { AuthorizationRequest authorize(AuthorizationRequest request); ... } So I don't see the purpose of put in the interface these methods: Authority[] getAuthorities(); Authority[] getAuthorities(Class? extends Authority clazz); These methods are not used by the ftpserver so they should not go in the interface. The interface beetween two entities should be keep simple as possible. The getAutorirhies() methods are used only by the specific implementation of User named BaseUser, another implementation of User should be free to choose another method for handling permissions. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (FTPSERVER-186) org.apache.ftpserver.util.IoUtils reinvent the wheel
[ https://issues.apache.org/jira/browse/FTPSERVER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niklas Gustavsson closed FTPSERVER-186. --- Resolution: Fixed Fix Version/s: 1.0-M4 Assignee: Niklas Gustavsson Patch applied, thanks! org.apache.ftpserver.util.IoUtils reinvent the wheel Key: FTPSERVER-186 URL: https://issues.apache.org/jira/browse/FTPSERVER-186 Project: FtpServer Issue Type: Bug Reporter: Andrea Francia Assignee: Niklas Gustavsson Fix For: 1.0-M4 Attachments: IoUtilsDesignJustification.patch The IoUtils class contains some method that are already provided by commons-io library. These methods: - public final static void close(InputStream is) - public final static void close(OutputStream os) - public final static void close(Reader rd) - public final static void close(Writer wr) Should be substituted with the relevant closeQuietly() method of org.apache.commons.io.IOUtils. These methods: - public final static void copy(Reader input, Writer output, int bufferSize) - public final static void copy(InputStream input, OutputStream output, int bufferSize) Should be substitured with the relevant copy() methods of org.apache.commons.io.IOUtils. These methods: - public final static String readFully(Reader reader) throws IOException - public final static String readFully(InputStream input) throws IOException Should be substitured with the relevant toString() methods of org.apache.commons.io.IOUtils. About this mehods: - public final static void delete(File file) throws IOException I'm not sure, maybe there something in the org.apache.commons.io.FileUtils. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (FTPSERVER-187) Make classes that are shared among threads immutable
Make classes that are shared among threads immutable Key: FTPSERVER-187 URL: https://issues.apache.org/jira/browse/FTPSERVER-187 Project: FtpServer Issue Type: Improvement Components: Core Affects Versions: 1.0-M3, 1.0-M2, 1.0-M1 Reporter: Niklas Gustavsson Assignee: Niklas Gustavsson Fix For: 1.0-M4 We have some classes that gets accessed by multiple threads. We should aim at making these immutable to the greatest extent possible. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (DIRMINA-626) Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig
Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig Key: DIRMINA-626 URL: https://issues.apache.org/jira/browse/DIRMINA-626 Project: MINA Issue Type: Bug Components: Transport Affects Versions: 2.0.0-M4, 2.0.0-RC1 Reporter: Edwin Lee Priority: Blocker Fix For: 2.0.0-M4, 2.0.0-RC1 The public accessor/mutator methods in org.apache.mina.transport.serial.DefaultSerialSessionConfig are annotated with @Override, but its superclass (org.apache.mina.core.session.AbstractIoSessionConfig) does not have those methods declared. Propose to: 1. Add a new abstract class org.apache.mina.transport.serial.AbstractSerialSessionConfig which extends org.apache.mina.core.session.AbstractIoSessionConfig and implements org.apache.mina.transport.serial.SerialSessionConfig. 2. The new abstract class declares the methods which org.apache.mina.transport.serial.DefaultSerialSessionConfig @OverrideS. 3. org.apache.mina.transport.serial.DefaultSerialSessionConfig extends org.apache.mina.transport.serial.AbstractSerialSessionConfig instead. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRMINA-626) Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig
[ https://issues.apache.org/jira/browse/DIRMINA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edwin Lee updated DIRMINA-626: -- Attachment: AbstractSerialSessionConfig.java Proposed new org.apache.mina.transport.serial.AbstractSerialSessionConfig abstract class. Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig Key: DIRMINA-626 URL: https://issues.apache.org/jira/browse/DIRMINA-626 Project: MINA Issue Type: Bug Components: Transport Affects Versions: 2.0.0-M4, 2.0.0-RC1 Reporter: Edwin Lee Priority: Blocker Fix For: 2.0.0-M4, 2.0.0-RC1 Attachments: AbstractSerialSessionConfig.java The public accessor/mutator methods in org.apache.mina.transport.serial.DefaultSerialSessionConfig are annotated with @Override, but its superclass (org.apache.mina.core.session.AbstractIoSessionConfig) does not have those methods declared. Propose to: 1. Add a new abstract class org.apache.mina.transport.serial.AbstractSerialSessionConfig which extends org.apache.mina.core.session.AbstractIoSessionConfig and implements org.apache.mina.transport.serial.SerialSessionConfig. 2. The new abstract class declares the methods which org.apache.mina.transport.serial.DefaultSerialSessionConfig @OverrideS. 3. org.apache.mina.transport.serial.DefaultSerialSessionConfig extends org.apache.mina.transport.serial.AbstractSerialSessionConfig instead. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-626) Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig
[ https://issues.apache.org/jira/browse/DIRMINA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635928#action_12635928 ] Edwin Lee commented on DIRMINA-626: --- Proposed changes for org.apache.mina.transport.serial.DefaultSerialSessionConfig. ### Eclipse Workspace Patch 1.0 #P mina-transport-serial Index: src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java === --- src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java (revision 700650) +++ src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java (working copy) @@ -19,7 +19,6 @@ */ package org.apache.mina.transport.serial; -import org.apache.mina.core.session.AbstractIoSessionConfig; import org.apache.mina.core.session.IoSessionConfig; /** @@ -28,7 +27,7 @@ * @author The Apache MINA Project (dev@mina.apache.org) * @version $Rev: 529576 $, $Date: 2007-04-17 14:25:07 +0200 (mar., 17 avr. 2007) $ */ -class DefaultSerialSessionConfig extends AbstractIoSessionConfig implements +class DefaultSerialSessionConfig extends AbstractSerialSessionConfig implements SerialSessionConfig { private int receiveThreshold = -1; Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig Key: DIRMINA-626 URL: https://issues.apache.org/jira/browse/DIRMINA-626 Project: MINA Issue Type: Bug Components: Transport Affects Versions: 2.0.0-M4, 2.0.0-RC1 Reporter: Edwin Lee Priority: Blocker Fix For: 2.0.0-M4, 2.0.0-RC1 Attachments: AbstractSerialSessionConfig.java The public accessor/mutator methods in org.apache.mina.transport.serial.DefaultSerialSessionConfig are annotated with @Override, but its superclass (org.apache.mina.core.session.AbstractIoSessionConfig) does not have those methods declared. Propose to: 1. Add a new abstract class org.apache.mina.transport.serial.AbstractSerialSessionConfig which extends org.apache.mina.core.session.AbstractIoSessionConfig and implements org.apache.mina.transport.serial.SerialSessionConfig. 2. The new abstract class declares the methods which org.apache.mina.transport.serial.DefaultSerialSessionConfig @OverrideS. 3. org.apache.mina.transport.serial.DefaultSerialSessionConfig extends org.apache.mina.transport.serial.AbstractSerialSessionConfig instead. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRMINA-626) Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig
[ https://issues.apache.org/jira/browse/DIRMINA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edwin Lee updated DIRMINA-626: -- Attachment: DefaultSerialSessionConfig.java Compilation Error in org.apache.mina.transport.serial.DefaultSerialSessionConfig Key: DIRMINA-626 URL: https://issues.apache.org/jira/browse/DIRMINA-626 Project: MINA Issue Type: Bug Components: Transport Affects Versions: 2.0.0-M4, 2.0.0-RC1 Reporter: Edwin Lee Priority: Blocker Fix For: 2.0.0-M4, 2.0.0-RC1 Attachments: AbstractSerialSessionConfig.java, DefaultSerialSessionConfig.java The public accessor/mutator methods in org.apache.mina.transport.serial.DefaultSerialSessionConfig are annotated with @Override, but its superclass (org.apache.mina.core.session.AbstractIoSessionConfig) does not have those methods declared. Propose to: 1. Add a new abstract class org.apache.mina.transport.serial.AbstractSerialSessionConfig which extends org.apache.mina.core.session.AbstractIoSessionConfig and implements org.apache.mina.transport.serial.SerialSessionConfig. 2. The new abstract class declares the methods which org.apache.mina.transport.serial.DefaultSerialSessionConfig @OverrideS. 3. org.apache.mina.transport.serial.DefaultSerialSessionConfig extends org.apache.mina.transport.serial.AbstractSerialSessionConfig instead. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-586) Dynamic delimiter support for TextLineCodecFactory
[ https://issues.apache.org/jira/browse/DIRMINA-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635939#action_12635939 ] Edwin Lee commented on DIRMINA-586: --- i encountered something similar when i was writing a configurable automated client engine for Telnet (i.e. automatically logs in, sends command, collect output, etc). (Seems like OP is also dealing with a Telnet login.) IMHO, this isn't exactly just an extension/enhancement of the TextLineCodecFactory (and corresponding TextLineEncoder and TextLineDecoder), though there are overlaps (both are text-based, and both use delimiters, though when dealing with Telnet, you may need more than just delimiters). IMHO, to fully handle the dynamic-ness of this, it probably requires a custom implementation of ProtocolDecoder's decode method (i.e. even if a DynamicTextLineDecoder is put in, a hook would be required, and the hook would almost cover the decode method), which is almost as good as a whole new ProtocolDecoder implementation, and hence a new ProtocolCodecFactory implementation (though the TextLineEncoder can probably be reused in this case). Dynamic delimiter support for TextLineCodecFactory -- Key: DIRMINA-586 URL: https://issues.apache.org/jira/browse/DIRMINA-586 Project: MINA Issue Type: Improvement Components: Filter Affects Versions: 2.0.0-M1 Reporter: Trustin Lee Priority: Minor Fix For: 2.0.0-M4 TextLineCodecFactory supports static delimiters only. For some cases, users need to switch the delimiter dynamically depending on context. Related discussion is found here: http://markmail.org/message/loiqoej35evt2yvv -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.