File tree 1 file changed +7
-0
lines changed
src/main/java/org/apache/commons/net/ftp 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -475,9 +475,16 @@ private boolean checkPROTValue(String prot) {
475
475
@ Override
476
476
public int sendCommand (String command , String args ) throws IOException {
477
477
int repCode = super .sendCommand (command , args );
478
+ /* If CCC is issued, restore socket i/o streams to unsecured versions */
478
479
if (FTPSCommand ._commands [FTPSCommand .CCC ].equals (command )) {
479
480
if (FTPReply .COMMAND_OK == repCode ) {
480
481
_socket_ = plainSocket ;
482
+ _controlInput_ = new BufferedReader (
483
+ new InputStreamReader (
484
+ _socket_ .getInputStream (), getControlEncoding ()));
485
+ _controlOutput_ = new BufferedWriter (
486
+ new OutputStreamWriter (
487
+ _socket_ .getOutputStream (), getControlEncoding ()));
481
488
setSocketFactory (null );
482
489
} else {
483
490
throw new SSLException (getReplyString ());
You can’t perform that action at this time.
0 commit comments