Skip to content

Commit

Permalink
ftp: log failures to wrap/encrypt responses
Browse files Browse the repository at this point in the history
Motivation:

A support ticket points to a FTP response being lost.  Although there is
no evidence pointing to a problem encrypting the response, this could
explain the apparent behaviour and we currently have no way to exclude
that possibility.

Modification:

Log if the FTP door is unable to encrypt a response.

Result:

A possible failure mode when the FTP door is replying is logged, to aid
diagnosing problems.

Target: master
Request: 4.1
Request: 4.0
Request: 3.2
Request: 3.1
Request: 3.0
Request: 2.16
Require-notes: yes
Require-book: no
Ticket: http://rt.dcache.org/Ticket/Display.html?id=9392
Acked-by: Albert Rossi
Acked-by: Jürgen Starek (verbally)

Conflicts:
	modules/dcache-ftp/src/main/java/org/dcache/ftp/door/GssFtpDoorV1.java

Conflicts:
	modules/dcache-ftp/src/main/java/org/dcache/ftp/door/GssFtpDoorV1.java
  • Loading branch information
paulmillar committed Apr 30, 2018
1 parent 6f0b418 commit a743552
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ public void acceptCommand(Method method, String command) {
@Override
protected void secure_reply(String answer, String code)
{
answer = answer + "\r\n";
byte[] data = answer.getBytes(UTF8);
byte[] data = (answer + "\r\n").getBytes(UTF8);
try {
data = context.wrap(data, 0, data.length);
} catch (IOException e) {
LOGGER.error("Failed to encrypt reply '{}': {}", answer, e.toString());
reply("500 Reply encryption error: " + e);
return;
}
Expand Down

0 comments on commit a743552

Please sign in to comment.