Skip to content
Snippets Groups Projects
Commit 9537580b authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Allow ftp server alternate replies to contain backslash-escaped control

characters.
parent bc0adcef
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,8 @@ Special-commands for the server.
For FTP, these are supported:
REPLY [command] [return value] [response string]
- Changes how the server responds to the [command]
- Changes how the server responds to the [command]. [response string] is
evaluated as a perl string, so it can contain embedded \r\n, for example.
COUNT [command] [num]
- Do the REPLY change for [command] only [num] times and then go back to the
built-in approach
......
......@@ -677,14 +677,13 @@ my %customreply;
my %customcount;
my %delayreply;
sub customize {
undef %customreply;
$nosave = 0; # default is to save as normal
$controldelay = 0; # default is no delaying the responses
$retrweirdo = 0;
$retrnosize = 0;
$pasvbadip = 0;
$nosave = 0;
%customreply = ();
%customcount = ();
%delayreply = ();
......@@ -695,7 +694,7 @@ sub customize {
while(<CUSTOM>) {
if($_ =~ /REPLY ([A-Z]+) (.*)/) {
$customreply{$1}=$2;
$customreply{$1}=eval "qq{$2}";
logmsg "FTPD: set custom reply for $1\n";
}
if($_ =~ /COUNT ([A-Z]+) (.*)/) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment