This changes eliminate a way to cripple Profile pages on other peers by sending special messages with HTML tags.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@331 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 20 years ago
parent dbd06eace9
commit 24d77b892f

@ -6,7 +6,7 @@
//Frankfurt, Germany, 2004, 2005
//
//This File is contributed by Alexander Schier
//last change: 27.02.2005
//last change: 29.06.2005 by Marc Nause
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
@ -54,6 +54,7 @@ import java.util.Properties;
import de.anomic.http.httpHeader;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.tools.unHtml;
public class EditProfile_p {
@ -83,17 +84,17 @@ public class EditProfile_p {
profile.setProperty("comment", (String)post.get("comment"));
}
prop.put("name", profile.getProperty("name", ""));
prop.put("nickname", profile.getProperty("nickname", ""));
prop.put("homepage", profile.getProperty("homepage", ""));
prop.put("email", profile.getProperty("email", ""));
prop.put("name", (new unHtml(profile.getProperty("name", ""))).un());
prop.put("nickname", (new unHtml(profile.getProperty("nickname", ""))).un());
prop.put("homepage", (new unHtml(profile.getProperty("homepage", ""))).un());
prop.put("email", (new unHtml(profile.getProperty("email", ""))).un());
prop.put("icq", profile.getProperty("icq", ""));
prop.put("jabber", profile.getProperty("jabber", ""));
prop.put("yahoo", profile.getProperty("yahoo", ""));
prop.put("msn", profile.getProperty("msn", ""));
prop.put("icq", (new unHtml(profile.getProperty("icq", ""))).un());
prop.put("jabber", (new unHtml(profile.getProperty("jabber", ""))).un());
prop.put("yahoo", (new unHtml(profile.getProperty("yahoo", ""))).un());
prop.put("msn", (new unHtml(profile.getProperty("msn", ""))).un());
prop.put("comment", profile.getProperty("comment", ""));
prop.put("comment", (new unHtml(profile.getProperty("comment", ""))).un());
FileOutputStream fileOut = null;
try{

@ -6,7 +6,7 @@
// Frankfurt, Germany, 2004, 2005
//
// This File is contributed by Alexander Schier
// last change: 27.02.2005
// last change: 29.06.2005 by Marc Nause
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@ -57,6 +57,7 @@ import de.anomic.server.serverSwitch;
import de.anomic.yacy.yacyClient;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeed;
import de.anomic.tools.unHtml;
public class ViewProfile {
@ -104,7 +105,7 @@ public class ViewProfile {
while (i.hasNext()) {
entry = (Map.Entry) i.next();
String key=(String)entry.getKey();
String value=((String)entry.getValue()).replaceAll("\r","").replaceAll("\\\\n","\n");
String value=(new unHtml(((String)entry.getValue()).replaceAll("\r","").replaceAll("\\\\n","\n"))).un();
//all known Keys which should be set as they are
if(knownKeys.contains(key)){
prop.put("success_"+key, 1);

Loading…
Cancel
Save