Roxen.git
/
server
/
plugins
/
protocols
/
ftp.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/plugins/protocols/ftp.pike:1:
// This is a roxen protocol module. // Copyright © 1997 - 2001, Roxen IS. /* * FTP protocol mk 2 *
-
* $Id: ftp.pike,v 2.
87
2003
/
01
/
23
16
:
21
:
02
mani Exp $
+
* $Id: ftp.pike,v 2.
88
2004
/
04
/
04
00
:
01
:
59
mani Exp $
* * Henrik Grubbström <grubba@roxen.com> */ /* * TODO: * * How much is supposed to be logged? */
Roxen.git/server/plugins/protocols/ftp.pike:1803:
case 301: case 302: if (file->extra_heads && file->extra_heads->Location) { send(504, ({ sprintf("'%s': %s: Redirect to %O.", cmd, f, file->extra_heads->Location) })); } else { send(504, ({ sprintf("'%s': %s: Redirect.", cmd, f) })); } break; case 401:
-
case 403:
+
send(530, ({ sprintf("'%s': %s: Access denied.", cmd, f) })); break;
-
+
case 403:
+
send(451, ({ sprintf("'%s': %s: Forbidden.",
+
cmd, f) }));
+
break;
case 405:
-
send(
530
, ({ sprintf("'%s': %s: Method not allowed.",
+
send(
550
, ({ sprintf("'%s': %s: Method not allowed.",
cmd, f) })); break; case 500: send(451, ({ sprintf("'%s': Requested action aborted: " "local error in processing.", cmd) })); break; default: if (!file) { file = ([ "error":404 ]); }
Roxen.git/server/plugins/protocols/ftp.pike:2893:
send(501, ({ "I don't understand your parameters." })); return; } string delimiter = args[0..0]; if ((delimiter[0] <= 32) || (delimiter[0] >= 127)) { send(501, ({ "Invalid delimiter." })); } array(string) segments = args/delimiter;
-
if (sizeof(args) !=
4
) {
+
if (sizeof(args) !=
5
) {
send(501, ({ "I don't understand your parameters." })); return; } if (segments[1] != "1") { // FIXME: No support for IPv6 yet. send(522, ({ "Network protocol not supported, use (1)" })); return; } if ((sizeof(segments[2]/".") != 4) || sizeof(replace(segments[2], ".0123456789"/"", allocate(11, "")))) {