git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1070 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
parent
444a5a9368
commit
889de6686c
@ -1,7 +1,49 @@
|
||||
package de.anomic.yacy;
|
||||
|
||||
import de.anomic.plasma.plasmaSwitchboard;
|
||||
import de.anomic.server.serverCodings;
|
||||
|
||||
public final class yacyVersion {
|
||||
public static final float YACY_SUPPORTS_PORT_FORWARDING = (float) 0.383;
|
||||
public static final float YACY_SUPPORTS_GZIP_POST_REQUESTS = (float) 0.40300772;
|
||||
public static final float YACY_ACCEPTS_RANKING_TRANSMISSION = (float) 0.414;
|
||||
|
||||
public static void migrate(plasmaSwitchboard sb){
|
||||
//set preset accounts/passwords
|
||||
String acc;
|
||||
if ((acc = sb.getConfig("proxyAccount", "")).length() > 0) {
|
||||
sb.setConfig("proxyAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(acc)));
|
||||
sb.setConfig("proxyAccount", "");
|
||||
}
|
||||
if ((acc = sb.getConfig("serverAccount", "")).length() > 0) {
|
||||
sb.setConfig("serverAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(acc)));
|
||||
sb.setConfig("serverAccount", "");
|
||||
}
|
||||
if ((acc = sb.getConfig("adminAccount", "")).length() > 0) {
|
||||
sb.setConfig("adminAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(acc)));
|
||||
sb.setConfig("adminAccount", "");
|
||||
}
|
||||
|
||||
// fix unsafe old passwords
|
||||
if ((acc = sb.getConfig("proxyAccountBase64", "")).length() > 0) {
|
||||
sb.setConfig("proxyAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(acc));
|
||||
sb.setConfig("proxyAccountBase64", "");
|
||||
}
|
||||
if ((acc = sb.getConfig("serverAccountBase64", "")).length() > 0) {
|
||||
sb.setConfig("serverAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(acc));
|
||||
sb.setConfig("serverAccountBase64", "");
|
||||
}
|
||||
if ((acc = sb.getConfig("adminAccountBase64", "")).length() > 0) {
|
||||
sb.setConfig("adminAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(acc));
|
||||
sb.setConfig("adminAccountBase64", "");
|
||||
}
|
||||
if ((acc = sb.getConfig("uploadAccountBase64", "")).length() > 0) {
|
||||
sb.setConfig("uploadAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(acc));
|
||||
sb.setConfig("uploadAccountBase64", "");
|
||||
}
|
||||
if ((acc = sb.getConfig("downloadAccountBase64", "")).length() > 0) {
|
||||
sb.setConfig("downloadAccountBase64MD5", de.anomic.server.serverCodings.encodeMD5Hex(acc));
|
||||
sb.setConfig("downloadAccountBase64", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue