Apache Commons Net Release Notes Apache Commons developers Reject CR/LF in SimpleSMTPHeader and SimpleNNTPHeader fields #397. Reject CR/LF in IMAP quoteMailboxName (#399). Reject CR/LF in FTP, POP3, NNTP and SMTP command senders (#400). Check parser type before instantiating class in DefaultFTPFileEntryParserFactory.createFileEntryParser() (#403). Run hostname verifier on FTPS data connection (#404). [Javadoc] Improve UnixFTPEntryParser when filename with leading space when listing contains a year instead of time (IBM i example) (#405). Force Gregorian calendar in FTP listing timestamp parsers (##406). TFTPRequestPacket now throws TFTPPacketException instead of ArrayIndexOutOfBoundsException (#407). Add and use FTPFile.setUserPermission(int, boolean). Bump org.apache.commons:commons-parent from 97 to 105. Bump commons-io:commons-io from 2.21.0 to 2.22.0. [test] Bump org.apache.commons:commons-collections4 from 4.5.0 to 4.6.0. [test] Bump org.apache.commons:commons-lang3 from 3.20.0 to 3.21.0. DaytimeTCPClientTest now should now pass inside most VPNs. Migrate tests to JUnit5 #358, #359. Fix malformed Javadoc comments. IMAPExportMbox now restores the current thread's interrupt flag when catching InterruptedException. IOUtil.readWrite() now restores the current thread's interrupt flag when catching InterruptedException. TelnetInputStream now restores the current thread's interrupt flag when catching InterruptedException. FTP fails to parse listings for Linux vsftpd in Chinese or Japanese #393. TelnetInputStream.read() doesn't preserve the original InterruptedException as the cause of its InterruptedIOException. FTPClient._storeFile(String, String, InputStream) doesn't always close it's internal socket when an exception is thrown early in processing. ListenerList.removeListener(T) now ignores null input to avoid a NullPointerException. ListenerList.addListener(T) now ignores null input. Fix typo in FTPConnectionClosedException message from FTP.getReply(boolean). Reimplement Util.copyReader() with IOUtils.copyLarge(). Reimplement Util.copyStream() with IOUtils.copyLarge(). Reimplement Util.copyStream() with IOUtils.copyLarge(). Deprecate Util.copyReader(Reader, Writer) in favor of IOUtils.copyLarge(Reader, Writer). Double leading dot on first line in DotTerminatedMessageWriter (#398). Add DatagramSocketClient.getDefaultTimeoutDuration() and deprecate getDefaultTimeout(). Add subnet IPv6 handling with SubnetUtils6 #391. Bump org.apache.commons:commons-parent from 85 to 97 #371, #388, #389. Bump org.apache.commons:commons-lang3 from 3.18.0 to 3.19.0. Bump commons-io:commons-io from 2.20.0 to 2.21.0. Bump Util.DEFAULT_COPY_BUFFER_SIZE from 1 KiB to 8 KiB. Increase message limit in IMAPReply.TAGGED_RESPONSE from 80 to 500 characters. Increase message limit in IMAPReply.UNTAGGED_RESPONSE from 160 to 500 characters. Remove InvalidKeySpecException from AuthenticatingIMAPClient.auth(AUTH_METHOD, String, String) never throws, it's not thrown. Remove InvalidKeySpecException from AuthenticatingIMAPClient.authenticate(AUTH_METHOD, String, String) never throws, it's not thrown. Remove InvalidKeySpecException from ExtendedPOP3Client.auth(AUTH_METHOD, String, String) never throws, it's not thrown. Remove InvalidKeySpecException from org.apache.commons.net.smtp.AuthenticatingSMTPClient.auth(AUTH_METHOD, String, String) never throws, it's not thrown. Fix SpotBugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in SSLSocketUtils. Fix PMD UnnecessaryFullyQualifiedName. Fix PMD UnusedFormalParameter. Fix PMD AvoidBranchingStatementAsLastInLoop in org.apache.commons.net.bsd.RCommandClient. Fix PMD UselessOverridingMethod in org.apache.commons.net.telnet.TelnetClient. Fix PMD UnnecessaryModifier. Deprecate MLSxEntryParser default constructor in favor of MLSxEntryParser.getInstance(). Deprecate direct access to org.apache.commons.net.nntp.Article.kid and next fields. Fix SpotBugs CT_CONSTRUCTOR_THROW in Base64 by implementing finalize() as a noop to avoid finalizer attacks. Add missing Javadoc to ListenerList. Add missing Javadoc to SubnetUtils. Deprecate PrintCommandListeners.PrintCommandListeners(). Deprecate NtpUtils.NtpUtils(). Deprecate FTPFileFilters.FTPFileFilters(). Avoid multiple possible NullPointerException in SocketClient.verifyRemote(Socket). PrintCommandListener.protocolReplyReceived(ProtocolCommandEvent) doesn't always use an end-of-line. FTPClientExample uses the wrong FTP system type to parse file lines. Base64 does not call super.finalize(). TFTPServer does not call super.finalize(). KeyManagerUtils.loadStore(String, File, String) shouldn't ignore an IOException closing a keystore stream; use try-with-resources. NNTPClient.readNewsgroupListing() can use an ArrayList instead of a Vector. Deprecate org.apache.commons.net.util.Charsets. Performance: NTFTPEntryParser.parseFTPEntry(String) doesn't need to parse timestamps if there is no name. Improve error handling in org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(String, FTPClientConfig). Fail-fast in org.apache.commons.net.PrintCommandListener.PrintCommandListener(PrintWriter, boolean, char, boolean) if the PrintWriter is null. Avoid NullPointerException in org.apache.commons.net.PrintCommandListener.org.apache.commons.net.PrintCommandListener.protocolCommandSent(ProtocolCommandEvent). Avoid NullPointerException in org.apache.commons.net.PrintCommandListener.org.apache.commons.net.PrintCommandListener.protocolReplyReceived(ProtocolCommandEvent). Add org.apache.commons.net.nntp.Article#getChild(). Add org.apache.commons.net.nntp.Article#getNext(). Add private SubnetAddressStringIterable and private SubnetAddressStringIterator to implement SubnetInfo.iterableAddressStrings() and SubnetInfo.streamAddressStrings() #298. Add SubnetInfo.iterableAddressStrings(). Add SubnetInfo.streamAddressStrings(). Add FTPCmd.OPTS. Add FTP.opts(String, String). Add FTP.opts(String...). Add FTP.setControlEncoding(Charset). Add --OPTS to FTPClientExample. Add accessing options map for TFTP request packet and allow using 'blksize' option #331. Add org.apache.commons.net.util.ListenerList.isEmpty(). Add org.apache.commons.net.ftp.FTPClient.getSystemTypeOverride(). Add generics to ListenerList. Add module-info.class in the JAR file instead of an Automatic-Module-Name in MANIFEST.MF. Bump org.apache.commons:commons-parent from 70 to 85 #261, #278, #280, #285, #298, #293, #300, #345. Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.18.0 #268, #273, #281, #354. Bump commons-io:commons-io from 2.16.1 to 2.20.0 #286, #308. Bump org.apache.commons:commons-collections4 from 4.5.0-M2 to 4.5.0 #314. Bump org.apache.ftpserver:ftpserver-core from 1.2.0 to 1.2.1. Allow longer data in pattern IMAPReply.UNTAGGED_RESPONSE. Fix Reproducible Builds issues #259. Precompile regular expression in UnixFTPEntryParser.preParse(List<String>). Guard against polynomial regular expression used on uncontrolled data in VMSVersioningFTPEntryParser.REGEX. Guard against polynomial regular expression used on uncontrolled data in IMAPReply.TAGGED_RESPONSE. Guard against polynomial regular expression used on uncontrolled data in IMAPReply.UNTAGGED_RESPONSE. Cannot connect to FTP server with HTTP proxy. Base 64 Encoding with URL and Filename Safe Alphabet should not chunk per RFC 4648. Deprecate org.apache.commons.net.util.Charsets.Charsets() for removal. Deprecate org.apache.commons.net.util.TrustManagerUtils.TrustManagerUtils() for removal. Add protected getters to FTPSClient #204. Add SubnetUtils.toString(). Add Maven property project.build.outputTimestamp for build reproducibility. Add FTP.DEFLATE_TRANSFER_MODE to support the "deflate" compression format in FTPClient.setFileTransferMode(int). Add org.apache.commons.net.SocketClient.checkOpenOutputStream(). Bump commons-parent from 62 to 70 #238. Bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.2.0, #221. Bump commons-lang3 from 3.13.0 to 3.14.0. Bump commons-io from 2.15.0 to 2.16.1 #236, #240. Add and use DatagramSocketClient.setDefaultTimeout(Duration) and deprecate DatagramSocketClient.setDefaultTimeout(int). Add and use TFTP.DEFAULT_TIMEOUT_DURATION and deprecate org.apache.commons.net.tftp.TFTP.DEFAULT_TIMEOUT. Add and use DatagramSocketClient#getSoTimeoutDuration(). Add and use DatagramSocketClient#setSoTimeout(Duration). Add and use DatagramSocketClient.checkOpen(). Add TelnetClient.sendAYT(Duration). TFTPServer implements AutoCloseable. DatagramSocketClient implements AutoCloseable. Add IMAP package tests, include junit-jupiter-params artifact #166. Add Base64 missing tests and documentation fixes #161. Add FTPFile tests and fix Javadoc typos #162. Add IMAPReply tests and documentation fixes #165. Delegate host resolution to Socket.connect() #138. Fixes many grammar issues and typos in Javadoc and code comments #141. Remove redundant (null) initializations and other clean ups #155. TFTPServer.setMaxTimeoutRetries() now throws IllegalArgumentException instead of RuntimeException. TFTPServer.setSocketTimeout() now throws IllegalArgumentException instead of RuntimeException. FTPCommand.checkArray() now throws IllegalStateException instead of RuntimeException. org.apache.commons.net.nntp.Threader now throws IllegalStateException instead of RuntimeException. POP3Command static initializer now throws IllegalStateException instead of RuntimeException. SMTPCommand static initializer now throws IllegalStateException instead of RuntimeException. SubnetUtils.SubnetInfo.getPreviousAddress() now throws IllegalStateException instead of RuntimeException. IMAPExportMbox.MboxListener.chunkReceived(IMAP) now throws UncheckedIOException instead of RuntimeException. IMAPUtils.imapLogin(URI, int, ProtocolCommandListener) now throws IOException instead of RuntimeException while maintaining method signature source compatibility. [StepSecurity] ci: Harden GitHub Actions #156. Javadoc for FtpClient.setControlKeepAliveReplyTimeout(Duration) says timeout is in milliseconds. Change class org.apache.commons.net.ftp.parser.MVSFTPEntryParser to support more datasets #182. Bulletproof TFTPServerPathTest #173. Deprecate org.apache.commons.net.util.Base64 in favor of java.util.Base64. Replace use of org.apache.commons.net.util.Base64 with java.util.Base64 in org.apache.commons.net.ftp. Replace use of org.apache.commons.net.util.Base64 with java.util.Base64 in org.apache.commons.net.imap. Replace use of org.apache.commons.net.util.Base64 with java.util.Base64 in org.apache.commons.net.pop3. Replace use of org.apache.commons.net.util.Base64 with java.util.Base64 in org.apache.commons.net.smtp. Bump commons-parent from 54 to 62 #132, #137, #153. Bump commons-io from 2.11.0 to 2.15.0. Bump commons-lang3 from 3.12.0 to 3.13.0. Use yyyy instead of YYYY in SimpleDateFormat #97. Prevent serialization of the 4 classes that implement Serializable. It is not useful and is unlikely to work properly. Use Math.min and Math.max method instead of manual calculations. #104. Add FTP option to toggle use of return host like CURL. FTPSClient execPROT removes proxy settings #90. JUnit5 assertThrows SimpleSMTPHeaderTestCase #121. JUnit5 assertThrows TestTimeInfo #120. Simplify conditions avoiding extra operations #88. Remove reflection from SSLSocketUtils. Process files with spaces in name for OS400 #95. [FTP] Add FTPClient.mdtmInstant(String). [FTP] Add MLSxEntryParser.parseGmtInstant(String). [FTP] Add FTPClient.getControlKeepAliveReplyTimeoutDuration(). [FTP] Add FTPClient.setControlKeepAliveReplyTimeout(Duration). [FTP] Add FTPClient.getControlKeepAliveTimeoutDuration(). [FTP] Add FTPClient.setControlKeepAliveTimeout(Duration). [FTP] Add FTPClient.getDataTimeout(). [FTP] Add FTPClient.setDataTimeout(Duration). [FTP] Add FTPFile.getTimestampInstant(). Add github/codeql-action. Bump actions/cache from 2.1.6 to 3.0.11 #93, #102, #115, #116. Bump actions/checkout from 2.3.4 to 3.1.0 #89, #91, #100, #114. Bump actions/upload-artifact from 3.1.0 to 3.1.1 #124. Bump junit from 4.13.1 to 5.9.1 Vintage #74. Bump commons-io from 2.6 to 2.11.0 #60. Bump commons.jacoco.version from 0.8.6 to 0.8.8. Bump commons.japicmp.version from 0.14.3 to 0.17.1. Bump commons.surefire.version from 2.22.2 to 3.0.0-M7. Bump ftpserver-core from 1.1.1 to 1.2.0 #96. Bump exec-maven-plugin from 3.0.0 to 3.1.0 #109. Bump commons-parent from 53 to 54 #112. Add and use NetConstants. Add and use SocketClient.applySocketAttributes(). [FTP] Add FTPClient.hasFeature(FTPCmd). [FTP] Add FTPClient.mdtmCalendar(String). [IMAP] Fix concurrent counting of chunks in IMAPExportMbox. Fix possible if rare NPEs in tests. Bump actions/checkout from v2.3.3 to v2.3.4 #69. Update SocketClient default connect timeout from ∞ to 60 seconds #51. Apply SocketClient timeout after connection but before SSL negotiation. Minor Improvements #71, #72. Bump actions/cache from v2 to v2.1.4 #73. Host name is not set on the SSLSocket causing isEndpointCheckingEnabled to fail. Fix possible socket and input stream leak on socket exception in org.apache.commons.net.ftp.FTPClient._retrieveFile(String, String, OutputStream). Performance issue when using the FTPClient to retrieve files #65. Improve Javadoc for IMAPSClient #68. Bump actions/setup-java from v1.4.2 to v1.4.3 #62. Bump junit from 4.13 to 4.13.1 #67. [FTPS] javax.net.ssl.SSLException: Unsupported or unrecognized SSL message, #59. Update actions/checkout from v2.3.1 to v2.3.3 #56, #61. IMAPClient.APPEND does not always calculate the correct length ALLO FTP Command for files >2GB IMAPClient could simplify using empty arguments IMAP fails to quote/encode mailbox names NPE when closing telnet stream Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility SubnetUtils.SubnetInfo.isInRange("0.0.0.0") returns true for CIDR/31, 32 Telnet subnegotiations hard-limited to 512 bytes - allow override MVSFTPEntryParser.preParse - MVS, z/OS - allow for merged Ext/Used fields examples should be in org.apache.commons.net subpackage Add SIZE command support Add POP3ExportMbox example code Add XOAUTH2 to IMAP and SMTP FTPHTTPClient - support for encoding other than UTF-8 Bug in MVSFTPEntryParser.parseUnixList (FindBugs) Error when using org.apache.commons.net.ftp.FTPClient setControlKeepAliveTimeout SubnetUtils#SubnetUtils - improved comment SubnetUtils - improve construction SubnetInfo#getCidrSignature - improve functions SubnetInfo#toCidrNotation: A wrong format subnet mask is allowed SubnetUtils - fixed spelling errors SubnetUtils#SubnetInfo - remove unnecessary accessors SubnetUtils - improve binary netmask algorithm System Information Leak in ftp parser VMS ftp LIST parsing results in empty file list FTPListParseEngine should support listing via MLSD NullPointerException when FTPClient remote verification fails 227 Entering Passive Mode Next and Previous IP Address in SubnetUtils.SubnetInfo MVSFTPEntryParser doesn't support Record Formats of U TFTPClient assumes that lastBlock == 0 only once Allow TFTPServer.java to bind to a specific network adapter Apache Commons TFTP does not reject request replies that originate from a control port. TFTP sendFile retry broken Allow TFTP socket IO tracing NullPointerException when disconnecting TelnetClient twice with JDK 7 Failure to parse times from SYST_L8 systems that report as "WINDOWS Type: L8" TFTP send and receive don't have progress indication FTPClient.setPassiveNatWorkaround assumes host is outside site local range FTPClient.mlistFile incorrectly handles MLST reply FTP does not validate command reply syntax fully DefaultUnixFTPFileEntryParserFactory Issue (leading spaces removal configuration) POP3Mail example: support host port; allow reading password from Console/stdin/environment FTP fails to parse listings for Solaris 10 FTPd in Japanese Add shorthand FTPClientConfig constructor HostnameVerifier is called with ip addess instead of the provided hostname TelnetClient._closeOutputStream unhandled exception from FilterOutputStream.close plainSocket in FTPSClient is never closed FTPClient.getReplyString() returns wrong value after connect() Alternative password input methods for IMAP examples More tests for Feb 29 handling. Don't use Feb 29 for short future date tests Documentation tweaks SimpleSMTPHeader fails to supply the required Date: header SimpleSMTPHeader does not allow for missing To: field SMTPClient.sendSimpleMessage() silently ignores failed recipients Update Javadoc SSL/TLS SocketClients do not verify the hostname against the certificate Allow FTPClient to use SYST response if system type is not specified in configuration FTPClientExample should support setting the date format FTPHTTPClient should use socket factory to create sockets UnixFTPEntryParser Drops Leading Spaces from File Names examples/Main now uses a property file to define aliases instead of scanning class files SocketTimeoutException connecting a FTP server via an HTTP Proxy FTPListParseEngine does not provide access to raw responses Add FTPClient method to return an FTPFile from an MDTM command FTPFile.toFormattedString - allow specification of TimeZone for display FTPFile.toFormattedString should print only signficant parts of the parsed date MLSxEntryParser needs test cases; parsing is too lax FTPFile.toFormattedString prints user and group in wrong order FTPClient.initiateListParsing does not correctly check if parserKey was cached Simplify TelnetOptionHandler class hierarchy FTPClient.getModificationTime(filename) returns complete received line including response code and EOL Strip the response code and EOL Make SubnetInfo.isInRange(int) public Default FTPClient bufferSize results in very slow retrieve transfers Fix code in Util#copyStream (also copyReader) that failed to use the proper default for buffer size 0 Util copyReader calls CopyStreamListener.bytesTransferred with the incorrect value for bytesTransferred Added control character processing to TelnetClientExample There is a lack of documentation regarding setControlKeepAliveTimeout Telnet does not convert LF to CRLF in ASCII mode telnet: spy read EOL is reversed Article#printThread should have option to use any PrintStream NPE if Threader.thread invoked with empty list or with null array IMAP FETCH example IMAPExportMbox can export selected nessages from an IMAP folder IMAP FETCH can overflow reply buffer; provide for partial responses Unnecesssary call to getReplyString() if no listeners configured input parameter of org.apache.commons.net.ftp.FTP.__getReply(boolean) is not used SubnetUtils throws exception on valid input Add SimpleNTPServer as example and for testing parser problem occurs if the filename contains one or more characters of which the second byte of Shift-JIS code is 0x85 Fix NT parser Added control encoding option to FTPClientExample Added missing set methods on NTP class and interface Avoid greedy matches within a regex SubnetUtils("0.0.0.0/0") does not behave as expected Fixed range checking so network and broadcast addresses are treated as unsigned ints SubnetUtils.SubnetInfo.getAddressCount() can overflow as it returns an int FTPClient sample in class javadoc "bug" Apache Commons Net 3.3 has a performance issue FTPClient#reinitialize is package protected Downloading files or members from the AS400 QSYS file system is not supported FTPClient#initFeatureMap should not initialize empty map if reply code is 530 IMAP APPEND multiple issues in IMapClient. Deprecated unusable append methods. Added new append method, as well as example IMapImportMbox class to make use of it. Exception for new SubnetUtils("0.0.0.0/0"). AuthenticatingSMTPClient needs a constructor with the isImplicit argument for SSL Race Condition on TelnetClient.disconnect() and TelnetInputStream.run() java.lang.IllegalStateException: Queue is full! Cannot process another character. User specified bufferSize reset to default when FTPClient is disconnected or reinitialized resulting in performance degradation. Option to disable private IP replacement in FTP passive mode. AuthenticatingSMTPClient does not support non-default encoding Always call FTPClient#setFileType after connection. Not all servers default to ASCII. FTPClient setSendBufferSize and setReceiveBufferSize on data socket. The previous fix caused performance problems. Added new getters and setters for the SO_SNDBUF and SO_RCVBUF values to be used on the data socket. Util copyReader/copyStream classes should use default buffer size for non-positive buffer size parameters. FTPCommand conversion to use enum; added FTPCmd emum and deprecated FTPCommand. Wrong passivHost when using FTPHTTPClient with EPSV FTPClient.CSL.cleanUp() fails to restore timeout value on exception FTPClient.printWorkingDirectory() incorrectly parses certain valid PWD command results retrieveFileStream fails randomly or hangs Remove unnecessary Base64 methods. Support XOAUTH. Base64.CHUNK_SEPARATOR should be private Base64.encodeBase64(byte[], boolean, boolean, int) does not calculate output size correctly for unchunked output. Regression: TelnetInputStream#available() blocks. FTPS: Hook to customize _openDataConnection_ SSLSocket before startHandshake() is called. Implement _openDataConnection(String, String) method to properly interface with FTPClient.openDataConnection(String, String) TelnetClient hangs when reader-thread startup is delayed. listFiles bug with folder that begins with "-". Clarify Javadoc. FTPClient setSoTimeout (int time) will result in NullPointerException. Clarify Javadoc. Request for native support for socks proxy routing with Commons net FTP. FtpClient sends REST when calling listFiles. Clarified Javadoc. FTPClient setSendBufferSize and setReceiveBufferSize on data socket. FTPClient in PASSIVE_LOCAL_DATA_CONNECTION_MODE cannot work when host have several different IP. IMAPClient#fetch() does not handle literal strings. MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException. Bug in documentation for FTPClient. The examples can now be run using "java -jar commons-net-examples-m.n.jar". This will automatically include the main net jar in the classpath. See documentation. FTPClientExample now supports "-A" for anonymous login StringIndexOutOfBoundsException: String index out of range: -1 if server respond with root is current directory. FTPTimestampParserImpl fails to parse future dates correctly on Feb 28th in a leap year. [FTP] mlistDir doc should be "MLSD" not "MSLD". [FTP] Allow user to provide default value in case SYST command fails. POP3Client.capa() should call POP3Client.getAdditionalReply() TFTP implementation subject to Sorcerer's Apprentice Syndrome TFTP does not handle RFC 783 retransmits TelnetInputStream doesn't support non-blocking IO when reader thread is not enabled FTP should support reporting NATed external IP address Commons NET site should link to the examples FTP using HTTP proxy not working FTPClient.storeFIle might fail when ControlKeepAliveTimeout is set (ditto for FTPCLient.retrieveFile) FTPS: Hook to customize _openDataConnection_ SSLSocket before startHandshake() is called Can't login to POP3S Server using explicit mode FTPClient fails to close local listener socket when command socket channel encounter "ReadTimeoutException" [FTP] Support for SYST "Mac OS" listing - "MACOS Peter's Server" [FTP] _openDataConnection_, __storeFile, and __storeFileStream should be protected and take String for FTP command. Likewise for receiveFile and receiveFileStream. [Telnet] Increasing sub-negotiation message holder array size SubnetUtils throws ArrayIndexOutOfBoundsException for new SubnetUtils( "1.2.3.4/32" ).getInfo().getAllAddresses() Problem connecting to TLS/SSL SMTP server using explicit mode. [Site] typo in migration how-to. FTPClient truncates file (storeFile method). Fix bug introduced in release 3.0. Change lenientFutureDates to default to true. This means short dates will be parsed as the current year when the host clock is up to 1 day ahead of the client clock. FTPSSocketFactory does not override createSocket(); causes java.net.SocketException: Unconnected sockets not implemented. ftp data connection does not use connectTimeout. Option to override SSL negotiation. Make FTPSClient#execAuth() and FTPSClient#sslNegotiation() protected IMAP, NNTP, POP3 and SMTP classes uses BufferedReader for control channel, which does not follow the standard. Changed reader to CRLFLineReader. FTP class uses BufferedReader for control channel, which does not follow the standard. Changed reader to CRLFLineReader. AS400 file timestamp format is wrong. Workround exists. Remove semi-redundant check in SubnetUtils.calculate(). Should Telnet class Exception blocks write to System.err? Catch blocks removed, and throws clauses added to allow caller to more easily detect and recover. FTPSClient does not handle AUTH or ADAT and only partially handles PBSZ. FTPSCommand should be deprecated. Better handling of CIDR/31 and CIDR/32 where isInclusive = false. Return 0 for address count, and 0.0.0.0 for each of the addresses Move ProtocolCommandSupport to SocketClient. Should the sendCommandWithID() methods be public? Made methods private, and deleted currently unused ones. Are the sendUntaggedCommand() methods needed? Renamed the method as sendData(), as it's not a command. Use enum for IMAPCommand. Added basic IMAP/IMAPS implementation. Unix parser should ignore "total nnn" lines. Article.addHeaderField() is currently write-only - there is no way to retrieve the headers - is it needed? Method was removed, along with the field. ntp.TimeStamp uses incorrect lazy initialization of static fields simpleFormatter and utcFormatter. Parsing is inefficient, as it parses everything twice. VMSVersioningFTPEntryParser#preParse should not call super.preParse(). TelnetInputStream has various threading bugs. TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode. See also NET-387. FTP does not apply timeout to initial responses. KeyManagerUtils - the KeyManager is not efficient. KeyManagerUtils - allow alias to be omitted when there is only one private key in the store A KeyManager is required when the protection level is set to 'P' with FTPSClient on active mode. Added KeyManagerUtils class to simplify provision of client certificates. FEAT response parsing. Added FTPClient methods: boolean hasFeature(feature [,option]), String fetaureValue(feature), String[] featureValues(feature) FTPClient - support for processing arbitrary commands that only use the control channel FTP listing should support MLST and MLSD. NLST does not take notice of HiddenFiles setting. NNTP Listgroups not working - broken server implementation. DotTerminatedMessageReader should extend BufferedReader, rather than Reader. ParserInitializationException doesn't use standard JDK exception chaining FTPSClient: java.security.cert.CertificateException: No X509TrustManager implementation available if trustManager == null Create TrustManagerFactory to provide custom TrustManagers. FTPSClient not properly supporting CCC and PROT P. Threader.thread should accept an Iterable rather than a List. "Unconnected sockets not implemented" when using FTPSClient Added disconnect() override which resets the socket factories to their defaults "java.net.SocketException: Broken pipe" when calling "TelnetClient.sendAYT()" Added SocketClient#isAvailable() method to perform additional checks on a socket. Add streaming methods (corresponding to array methods) to NNTPClient. FTPClient.listFiles() does not work properly, if remote server speaks German. Match non-space{3} instead of A-Za-z{3} FTPClientConfig: setServerLanguageCode and setShortMonthNames do not work. Ensure that config is passed to all parsers that can use it. NNTPClient has problems with group listings for large groups. Possible NPE in Threader.java nntp.Article is very inefficient and incorrect. The FTP client should autodetect the control encoding. Can't connect to a server behind firewall in passive mode. Queue is full TelnetInputStream. Implement Telnet Command sender. Telnet client: not properly handling IAC bytes within subnegotiation messages: - failing to double IACs on output - failing to de-double IACs in input Telnet client: Support Client-initiated Subnegotiation Messages. Telnet client: Support Listener Notification of Incoming Data. Incorrect error handling in method initiateListParsing of FTPClient. SASL PLAIN and CRAM-MD5 authentication. The POP3 client does not support SSL/TLS connections. Removed deprecated unused fields from FTPSClient: - KEYSTORE_ALGORITHM, PROVIDER, STORE_TYPE, TRUSTSTORE_ALGORITHM Implement A Keepalive Mechanism. Control channel keepalive implemented for the following methods: appendFile, storeFile, storeUniqueFile, retrieveFile. StackOverflowError in Threader. POP3MessageInfo fields should be final. Get rid of using deprecated API in VMSFTPEntryParser. The method VMSFTPEntryParser.parseFileList(InputStream listStream) should not be present. FTPFileEntryParser API samples are wrong. Use properties file (/systemType.properties) to handle new OS-type auto-detection. Commons net ftp cannot handle unknown type parser and should allow override of parser through vm argument. The system property "org.apache.commons.net.ftp.systemType" can be used to provide the system type. Unhandled SecurityException in DefaultFTPFileEntryParserFactory.createFileEntryParser when using applets. DefaultFTPFileEntryParserFactory.createFileEntryParser(String key) always tries to load a class. New FTPClient method to retrieve all directory names in the current working directory. Added methods listDirectories(), listDirectories(String path). The SMTPClient does not support authentication. The SMTP client does not support SSL/TLS connections. Implement copy Listener in FTPClient file operations. CopyStreamAdapter unconditionally resets the CopyStreamEvent source and is inefficient. examples.nntp.NNTPUtils does not compile APOP authentication fails most of the time. Fix by adding leading 0 if necessary. FromNetASCIIInputStream can throw a NullPointerException FTPClient.remoteAppend(String filename) uses STOR instead of APPE Incorrect parsing of timestamp on Windows CE Fix parsing to allow for new-style DOS listing using 24hr clock rather than AM/PM ftp.FTPClient.initiateListParsing(String parserKey, String pathname) can call createFileEntryParser with null systemName. Fix this by adding getSystemType() which does not return null, and deprecating getSystemName(). Add support for FTPFileFilter filters. New classes FTPFileFilter, FTPFileFilters, new methods: FTPListParseEngine#getFiles(FTPFileFilter filter) FTPClient.listFiles(String pathname, FTPFileFilter filter) Optionally enable EPSV with IPv4; Only send EPRT with IPv6. Fix incorrect port used with EPRT. Allow activeMaxPort == activeMinPort in getActivePort() method. FromNetASCIIInputStream.read(byte[], int, int) may change length passed to superclass if not doing conversion Testcase to show WindowSizeOptionHandler is working OK The method VMSFTPEntryParser.parseFileList(InputStream listStream) should not be present. Partial fix - marked method as deprecated and to be removed Telnet EOR is "consumed" by TelnetInputStream when in BINARY transmission. Send notification to TelnetNotificationHandler. TelnetInoutStream#__read() bug in the __receiveState handling for the _STATE_IAC state. SocketClient should ensure input and output streams are closed FTP: initiateListParsing should not cache entryParser Improvement to isInRange method in SubnetUtil.SubnetInfo class FTPClient.listFiles() corrupts file name in certain circumstances Telnet spyStream NullPointerException Deprecated the following unused fields from org.apache.commons.net.ftp.FTPSClient: KEYSTORE_ALGORITHM, PROVIDER, STORE_TYPE, TRUSTSTORE_ALGORITHM Fix site reports Add support for setting external host ip/port range Add fix and testcase for DotTerminatedMessageReader Add support for IPv6 EPRT/EPSV Fix SubnetUtils for /32 subnets and add inclusive host count flag Fix NPE when listHiddenFiles was on UNIXFTPEntryParser didn't preserve trailing whitespace in files method SubnetUtils.SubnetInfo.isInRange(addr) returns incorrect result Method createServerSocket of FTPSSocketFactory never called and thus UseClientMode is incorrect in a secured ftp transfer using active mode. Fix inconsistent command list in FTPCommand DefaultFTPFileEntryParserFactory did not work with Netware FTP server returning "NETWARE TYPE: L8" FTP.getReplyStrings() returned array of null Strings UnixFTPEntryParser regex did not match some directory entries SubnetUtils.SubnetInfo.isInRange(...) returned incorrect values SubnetUtils.SubnetInfo.isInRange(...) behavior not documented SubnetUtils did not handle /31 and /32 CIDRs well UnixFTPEntryParser failed to parse entry in certain conditions FTPClient.listFiles() corrupted file name in certain circumstances Moved class "ThreadContainer" from Threader.java into its own source file FTPSClient should accept a pre-configured SSLContext SubnetUtils / SubNetInfo toString() implementations Improve NNTPClient handling of invalid articles Refactor examples package. Javadoc fixes, improvements, and refactoring. Apply MFMT patch Fix copying of reply lines collection Fix incorrect NNTP constant Restore socket state after CCC command Example code in FTPClient doesn't compile Fix inconsistent handling of socket read/write buffer size UnixFTPEntryParser fails to parse some entries One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly Add null check in TelnetClient::disconnect(). Remove deprecated FTPFileIterator and FTPFileList classes. Add connection timeout functionality to SocketClient. Make the KeyManager and TrustManager settable (niklas@protocol7.com). Patch FTPSClient to set default SSLServerSocketFactory. Thanks niklas@protocol7.com Patch to prevent TFTPClient dropping last packet. Thanks palm@poplarware.com Change isConnected() method to delegate to underlying socket connection. FTPS (TLS and SSL) is now supported. Thanks to Jose Juan Montiel, Paul Ferraro, and Satoshi Ishigami. Commons::Net now uses Maven 2. The project.xml has been replaced with a pom.xml, and the source tree layout has been changed accordingly. Removed old ftp2 proposal directories. Commons::Net now uses JDK regex functionality, saving on an extra [oro] dependency. There are now no external dependencies required. Various syntactic issues (FindBugs issues, JDK 5.0 generics support) Applied Rob Hasselbaum's rhasselbaum -> alumni.ithaca.edu patch for PR 38688 fixing a TelnetInputStream hang. Exposed control connection of FTP class via _controlInput_ and _controlOutput_ protected member variables in response to PR 38309 reported by josejuan.montiel@gmail.com. Reverted PR 32859 patch to TFTPClient because it caused final packets to not be sent. Make FTPClient extend SocketClient instead of TelnetClient. From jhindsley@providerlink.com Adds an "e" symbolic link flag to the Unix FTP parser. From denisgaebler@netscape.net Allow hidden files to be listed. Thanks to mario@ops.co.at Remove reflective check for Socket::isConnected() (no longer needed) Added WindowSizeOptionHandler for TelnetClient. Thanks to yuvalkashtan@gmail.com Refactored *Client classes under net/ package into separate subpackages, and move PrintCommandListener out of the examples/ package. Added an ant target to the Maven build to generate an FTP-only jar file, for clients who wish to use only FTP-based functionality. Custom SocketFactory interface has been replaced with the JDK SocketFactory implementation. Added ServerSocketFactory instance to SocketClient. Removed redundant FTP.IMAGE_FILE_TYPE flag. Added heavily updated MVSFTPEntryParser from henrik.sorensen@balcab.ch Removed deprecated classes FTPFileListParser, FTPFileListParserImpl, and DefaultFTPFileListParser. Also removed associated deprecated methods from FTPClient. Added encoding to FingerClient. From Ulrich Mayring. Catch BindException in RCommandClient::connect(). Add encoding specifier to SMTPClient. Add setters for socket send/receive buffer size to SocketClient. Fix PASV specifiers that broke previously. From Chris Eagle. Catch NPE in FTP parser factory method. Don't bind a UDP socket to NTP protocol port. Better handling of user and group names with embedded spaces in FTP listings. Add configurable multiline parsing. Add fix for broken leap year date parsing. Add SubnetUtils class (suggested by Kenny McLeod) Add Unix-type handling for UNKNOWN Type: L8 syst() message systems. Allow FTPTimestampParserImpl to take a predefined Calendar instance representing current time. Replace Exception with IOException VMS file permission parsing TelnetInputStream swallows interruptedexception as IOException the data connection socket is not closed when an IOException occurred ParserInitializationException when connecting to a Unix FTP server: comparison string must be upper case FTPFileEntryParserImpl.preParse() doesn't remove unparsable entries at the end of the file list Applied patches for defect 37113. Code incompatible with jdk 1.3. Original patch submitted by Andrea Rombald Applied patches for defect 37522. updated project.xml to correct compatibility level. Fixed typo in method name. FTP.removeCommandListener() was missing the L. Problem reported by Per.Lindberger@linkon.se. Applied fix for PR 33942 and PR 31793. Original patch submitted by mario@ops.co.at TFTPClient was ignoring final ACK (PR 32859). Thanks to perttu.auramo@ekahau.com Applied fix for ACL parsing in the FTP client (PR 33972). Submitted by robertalasch@yahoo.com Added missing NTP/SNTP unit tests to the codebase. Applied fix for POP3Client returning empty reply strings (PR 34133). Thanks to sammy_c@lineone.net NTP port parameter was being ignored (PR 34219). Fixed by felix.eichhorn@3soft.de An FTP parser for MVS was added. Submitted by wnoto@openfinance.com Added functionality for extensible parsing of FTP responses, using a configurable format string. This should enable the FTP client to operate across many different locales and date formats. Applied patch for PR 31793. Thanks to mario@ops.co.at Added message threading functionality to the NNTP client. Added return code 521 to FTPReply.java - this should obviate the need for the Ant FTP task to manually declare it. Add explicit notify() in TelnetInputStream::read(), so available() returns an accurate value. Thanks to tpalkot@gmail.com. Added SNTP/NTP components into the Commons-Net codebase, courtesy of Jason Matthews. Added POP3 test suite, courtesy of Mike George mike.george@comcast.net. Applied fix for FTPClient returning null for certain timestamp formats (BUG #30737) Build.xml fixes - dont include example classes in redistributable .jar, remove test dependency from javadoc target, and exclude private members from generated javadoc. Fixed bug in TFTPClient::setMaxTimeout(), spotted by steve@widge.net Some changes to facilitate compilation under JDK 5.0 Return correct NNTP article count when high and low watermarks are 0. Spotted by jmordax@terra.es Remove trailing null byte in TFTP packets. Thanks to gerard.dens@alcatel.be Many javadoc fixes. Allow FTPClient to set transfer buffer size. Ensure consistent handling of encoding throughout FTPClient operations. Patch submitted by leif@tanukisoftware.com. Fix TelnetClient zombie thread issue Fixed regression from migration to new parsers. Most of the new parsers parsed the file size as an integer instead of a long. Changed all of them to set the size to long. This problem was detected by the reporter of: https://issues.apache.org/bugzilla/show_bug.cgi?id=30345 fixed bug in the way FTPClient.listFiles worked when a directory was not specified. Current directory was not being 'remembered'. This was most problematic in the dependent ftp task of Ant. fixed handling of certain unusual "special" file types in the Unix parser. changed code that rendered package uncompilable under JDK 1.2 Mario Ivankovits mario@ops.co.at added functionality supporting correct handling of the "dirstyle" attribute of NT and OS400 servers that allows them to mimic Unix ftp servers. and a bug fix affecting handling of sticky and suid bits on Unix FTP servers. Mario Ivankovits mario@ops.co.at added parser for OS400. Added a functional junit test testing list parsing against real servers and fix several bugs found through this test. Ted Wise ctwise@bellsouth.net provided a patch to add the XHDR extended NNTP command. Deprecated FTPFileListParser interface, DefaultFTPFileListParser class, and the FTPClient.listFiles methods that accepted an FTPFileListParser parameter. These deprecated classes and methods will be removed in version 2.0. Added org.apache.commons.net.parser.FTPFileEntryParserFactory interface and a default implementation: DefaultFTPFileEntryParserFactory. This addition facilitates the autodetection of which FTPFileEntryParser to use to generate listings. FTPClient.listFiles methods were added that implement autodetection. Rory Winston Rory.Winston@telewest.co.uk provided patches to add the following extended NNTP commands to NNTPClient: XOVER, AUTHINFO USER, AUTHINFO PASS, and LIST ACTIVE. Changed connection hooks for FTP, SMTP, POP3, and NNTP classes to force use of an 8-bit US-ASCII superset (ISO-8859-1) for protocol communication. This was necessary because InputStreamReader and OutputStreamWriter use the default client-side character set encoding. fasselin@ca.ibm.com reported failure of SMTP on OS/390 which has EBCDIC as the native character set. Applied variation of fix suggested by Matthieu Recouly matthieu.recouly@laposte.net so that UnixFTPEntryParser may handle listings of the form: "drwxr-xr-x 1 usernameftp 512 Jan 29 23:32 prog" where the space between user name and group is omitted. Applied patch from Stephane Este-Gracias sestegra@free.fr that fixes the parsing of VMS listings by VMSFTPEntryParser.. If the buffer queue run full, the run() method sometimes hangs forever. Changed wait() to wait(100) as with other changes in TelnetInputStream. Fix submitted From: J. Matysiak ( j.matysiak@cenit.de ). FTP.smnt(String dir) was not passing on the dir to the SMNT command as an argument. Added a link to the FAQ currently hosted on the Apache Wiki. Changed package private NNTP._reader and NNTP._writer member variables to protected NNTP._reader_ and NNTP._writer_ variables as suggested by issue report 16995 to facilitate extending NNTPClient functionality in subclasses. Changed name of FTPClient.__openDataConnection() to FTPClient._openDataConnection_() to remain consistent with the convention in the code that protected members are of the form _foo_. At some point __openDataConnection() had been changed from private to protected. Added terminal option support to the telnet client with tests. From Bruno D'Avanzo ( b.davanzo@inwind.it ). New parsers merged with mainline with support for old list parsers. Added a migration document for moving from NetComponents to Commons/Net. Moved the ftp2 tree with tests to a proposal directory and setup a build for that code. This can grow in this area so users don't think it is production ready. Cleaned up license header on some source. Moved .io and .util to .net.io and .net.util in preparation for 1.0 release. Fixed typo in NNTP.removeProtocolCommandListener() method name. It was missing an L. From: joev@atg.com. Various site updates including this changes doc and publish date information. Patch for restarting FTP file transfers. The offset was not being sent immediately before the data transfer command on account. The bug was apparently introduced in NetComponents when it was decided to always send a PORT command before each data transfer to avoid socket reuse problems on Windows. From: Tapan Karecha ( tapan@india.hp.com ). Applied a fix for potential deadlock in TelnetInputStream by changing a wait() to a wait(100). From: Tapan Karecha ( tapan@india.hp.com ). FTP examples now use passive ftp connections.