projects
/
mgsmtp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Block more HTTP request methods
[mgsmtp.git]
/
Listener.pas
diff --git
a/Listener.pas
b/Listener.pas
index 52d753d3d59c94a1bfc1ba3f1574fc6c2815911e..fd607c95772ebd22eb51315e63521c47c98cd703 100644
(file)
--- a/
Listener.pas
+++ b/
Listener.pas
@@
-230,7
+230,9
@@
begin
if (Length(Cmd) = 0) or (not ReadSucceeded) or UnexpectedFail then { Nothing. }
if (Length(Cmd) = 0) or (not ReadSucceeded) or UnexpectedFail then { Nothing. }
- else if (Cmd = 'GET') or (Cmd = 'HEAD') or (Cmd = 'POST') then begin
+ else if (Cmd = 'GET') or (Cmd = 'HEAD') or (Cmd = 'PUT') or (Cmd = 'POST')
+ or (Cmd = 'DELETE') or (Cmd = 'CONNECT') or (Cmd = 'OPTIONS')
+ or (Cmd = 'PATCH') or (Cmd = 'TRACE') then begin
SendAndLogResponse(SMTP_R_SERVICE_NA, 'Please learn to speak SMTP for I won''t speak HTTP. Stop abusing my service!');
UnexpectedFail:= true;
end
SendAndLogResponse(SMTP_R_SERVICE_NA, 'Please learn to speak SMTP for I won''t speak HTTP. Stop abusing my service!');
UnexpectedFail:= true;
end