added a concept for external parsers; pdf an doc parser are integrated but not active yet.
fixed several bugs that caused thread-locks and 100% CPU load
fixed bug with cookie storage; changed handling of multiple cookies
+
fixed brute-force password attack denial
check on new peer names: must not occur already and may only contain letters, numbers and '_' or '-'.
-
many minor bug fixes and spell corrections in interface
+
many minor bug fixes and spell corrections in web-interface
v0.36_build20050326
diff --git a/htroot/MessageSend_p.java b/htroot/MessageSend_p.java
index 7062db03b..deaeb752a 100644
--- a/htroot/MessageSend_p.java
+++ b/htroot/MessageSend_p.java
@@ -80,10 +80,11 @@ public class MessageSend_p {
HashMap result = yacyClient.permissionMessage(hash);
//System.out.println("DEBUG: permission request result = " + result.toString());
String peerName;
+ yacySeed targetPeer = null;
if (hash.equals(yacyCore.seedDB.mySeed.hash)) {
peerName = yacyCore.seedDB.mySeed.get("Name","nameless");
} else {
- yacySeed targetPeer = yacyCore.seedDB.getConnected(hash);
+ targetPeer = yacyCore.seedDB.getConnected(hash);
if (targetPeer == null)
peerName = "nameless";
else
@@ -92,14 +93,17 @@ public class MessageSend_p {
String response = (result == null) ? "-1" : (String) result.get("response");
if ((response == null) || (response.equals("-1"))) {
// we don't have permission or other peer does not exist
- body += "
You cannot send a message to '" + peerName + "'. The peer does not respond.
";
+ body += "
You cannot send a message to '" + peerName + "'. The peer does not respond. It was now removed from the peer-list.
";
+ if (targetPeer != null) {
+ yacyCore.peerActions.disconnectPeer(targetPeer);
+ }
} else {
// write input form
int messagesize = Integer.parseInt((String) result.get("messagesize"));
int attachmentsize = Integer.parseInt((String) result.get("attachmentsize"));
body += "
The peer '" + peerName + "' is alive and responded: ";
body += "'" + response + " You are allowed to send me a message ≤ " + messagesize + " kb and an attachment ≤ " + attachmentsize + ".'