fixing server & proxy access settings

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1857 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent fb4100d47b
commit 04ab5da350

@ -39,10 +39,9 @@ Your new administration account name is #[user]#. The password has been accepted
#(/restart)#
::<!-- 7 -->
<b>Your proxy access setting has been changed.</b><br>
Your new proxy account name is <div class="settingsValue">#[user]#</div>. The password has been accepted.<br>
If you open any public web page through the proxy, you must log-in then.<p>
The new proxy IP filter is set to <div class="settingsValue">#[filter]#</div>.<br>
The proxy port is: <div class="settingsValue">#[port]#</div><p>
If you open any public web page through the proxy, you must log-in.<p>
The new proxy IP filter is set to <span class="settingsValue">#[filter]#</span><br>
The proxy port is: <span class="settingsValue">#[port]#</span>
#(restart)#
::
Port rebinding will be done in a view seconds.<br>

@ -284,23 +284,23 @@ public class SettingsAck_p {
if (post.containsKey("serveraccount")) {
// read and process data
String filter = ((String) post.get("serverfilter")).trim();
String user = (String) post.get("serveruser");
/*String user = (String) post.get("serveruser");
String pw1 = (String) post.get("serverpw1");
String pw2 = (String) post.get("serverpw2");
String pw2 = (String) post.get("serverpw2");*/
// do checks
if (filter == null) {
//if ((filter == null) || (user == null) || (pw1 == null) || (pw2 == null)) {
prop.put("info", 1);//error with submitted information
return prop;
}
if (user.length() == 0) {
/* if (user.length() == 0) {
prop.put("info", 2);//username must be given
return prop;
}
if (!(pw1.equals(pw2))) {
prop.put("info", 3);//pw check failed
return prop;
}
}*/
if (filter.length() == 0) filter = "*";
else if (!filter.equals("*")){
// testing proxy filter
@ -325,11 +325,11 @@ public class SettingsAck_p {
// check passed. set account:
env.setConfig("serverClient", filter);
env.setConfig("serverAccountBase64MD5", serverCodings.encodeMD5Hex(kelondroBase64Order.standardCoder.encodeString(user + ":" + pw1)));
//env.setConfig("serverAccountBase64MD5", serverCodings.encodeMD5Hex(kelondroBase64Order.standardCoder.encodeString(user + ":" + pw1)));
env.setConfig("serverAccount", "");
prop.put("info", 8);//server access filter updated
prop.put("info_user", user);
//prop.put("info_user", user);
prop.put("info_filter", filter);
return prop;
}

Loading…
Cancel
Save