mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
*) don't accept messages without subject or payload
See: http://www.yacy-forum.de/viewtopic.php?p=21656 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2115 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
82b2bc6932
commit
fcec40fcc6
|
@ -121,8 +121,15 @@ public final class message {
|
|||
yacySeed otherSeed = yacySeed.genRemoteSeed(otherSeedString, key, true);
|
||||
|
||||
String subject = crypt.simpleDecode(post.get("subject", ""), key); // message's subject
|
||||
subject = subject.trim();
|
||||
String message = crypt.simpleDecode(post.get("message", ""), key); // message body
|
||||
|
||||
message = message.trim();
|
||||
|
||||
if (subject.length() == 0 && message.length() == 0) {
|
||||
prop.put("response", "-1"); // don't accept empty messages
|
||||
return prop;
|
||||
}
|
||||
|
||||
prop.put("response", "Thank you!");
|
||||
|
||||
// save message
|
||||
|
|
Loading…
Reference in New Issue
Block a user