- access is granted for localhost users to administration pages by default
- the default setting can be changed in the BasicConfig.html page
- if the BasicConfig page was accessed with post and no password was submitted, a random password is generated
- a headless installation MUST give a password upon first call of the configuration page, otherwise they will not be able to access it again
- if no password is given within 10 minutes after start-up, a random password is generated
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4804 6c8d7289-2bf4-0310-a012-ef5d649a1542
#(statusPassword)#<imgsrc="/env/grafics/bad.png"height="32"width="32"alt="warning"/> Please set a password for your peer to protect your settings (> 3 characters); if this is successful you will be asked to log in with these values immediately.::<imgsrc="/env/grafics/ok.png"height="32"width="32"alt="ok"/> Password is set#(/statusPassword)#<br/>
<fieldset>
#(statusPassword)#<imgsrc="/env/grafics/ok.png"height="16"width="16"alt="warning"/> Access to localhost granted without password::<imgsrc="/env/grafics/ok.png"height="16"width="16"alt="ok"/> Password is set#(/statusPassword)#<br/>
#(statusName)#<imgsrc="/env/grafics/bad.png"height="32" width="32" alt="warning"/> Your peer name has not been customized; please set your own peer name::<imgsrc="/env/grafics/ok.png"height="32" width="32" alt="ok"/> You have a nice peer name#(/statusName)#<br/>
#(statusName)#<imgsrc="/env/grafics/bad.png"height="16" width="16" alt="warning"/> Your peer name has not been customized; please set your own peer name::<imgsrc="/env/grafics/ok.png"height="16" width="16" alt="ok"/> You have a nice peer name#(/statusName)#<br/>
<fieldset>
<dl>
<dt><labelfor="peername">Peer Name: </label></dt>
@ -56,7 +71,7 @@
</fieldset>
</li>
<li>
#(statusPort)#<imgsrc="/env/grafics/bad.png"height="32" width="32" alt="warning"/> Your peer cannot be reached from outside (which is not fatal, but would be good for the YaCy network); please open your firewall for this port and/or set a virtual server option in your router to allow connections on this port.::<imgsrc="/env/grafics/ok.png"height="32" width="32" alt="ok"/> Your peer can be reached by other peers#(/statusPort)#<br/>
#(statusPort)#<imgsrc="/env/grafics/bad.png"height="16" width="16" alt="warning"/> Your peer cannot be reached from outside (which is not fatal, but would be good for the YaCy network); please open your firewall for this port and/or set a virtual server option in your router to allow connections on this port.::<imgsrc="/env/grafics/ok.png"height="16" width="16" alt="ok"/> Your peer can be reached by other peers#(/statusPort)#<br/>
#(commitCrawlPlea)#::<divclass="error">P2P operation can run without remote indexing, but runs better with remote indexing switched on. Please switch 'Accept Remote Crawl Requests' on.</div>#(/commitCrawlPlea)#
#(commitDHTIsRobinson)#::<divclass="error">For P2P operation, at least DHT distribution or DHT receive (or both) must be set. You have thus defined a Robinson configuration.</div>#(/commitDHTIsRobinson)#
#(commitDHTNoGlobalSearch)#::<divclass="error">Global Search in P2P configuration is only allowed, if both, index receive and distribution is switched on. You have a P2P configuration, but are not allowed to search other peers.</div>#(/commitDHTNoGlobalSearch)#
#(commitDHTNoGlobalSearch)#::<divclass="error">Global Search in P2P configuration is only allowed, if index receive is switched on. You have a P2P configuration, but are not allowed to search other peers.</div>#(/commitDHTNoGlobalSearch)#
#(commitRobinson)#::<divclass="commit">For Robinson Mode, index distribution and receive is switched off.</div>#(/commitRobinson)#
#(commitRobinsonWithRemoteIndexing)#::<divclass="commit">This Robinson Mode switches remote indexing on, but limits targets to peers within the same cluster. Remote indexing requests from peers within the same cluster are accepted.</div>#(/commitRobinsonWithRemoteIndexing)#
#(commitRobinsonWithoutRemoteIndexing)#::<divclass="commit">This Robinson Mode does not allow any remote indexing (neither requests remote indexing, nor accepts it).</div>#(/commitRobinsonWithoutRemoteIndexing)#
deployThread(CLEANUP,"Cleanup","simple cleaning process for monitoring information",null,
newserverInstantBusyThread(this,CLEANUP_METHOD_START,CLEANUP_METHOD_JOBCOUNT,CLEANUP_METHOD_FREEMEM),10000);// all 5 Minutes
newserverInstantBusyThread(this,CLEANUP_METHOD_START,CLEANUP_METHOD_JOBCOUNT,CLEANUP_METHOD_FREEMEM),600000);// all 5 Minutes, wait 10 minutes until first run
deployThread(CRAWLSTACK,"Crawl URL Stacker","process that checks url for double-occurrences and for allowance/disallowance by robots.txt",null,
deployThread(INDEXER,"Indexing","thread that either initiates a parsing/indexing queue, distributes the index into the DHT, stores parsed documents or flushes the index cache","/IndexCreateIndexingQueue_p.html",
@ -1774,6 +1775,13 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
try{
booleanhasDoneSomething=false;
// set a random password if no password is configured
if((clientIP.equals("localhost")||clientIP.startsWith("0:0:0:0:0:0:0:1"))/*&& (adminAccountBase64MD5.equals(authorization))*/)return3;// soft-authenticated for localhost
if(accessFromLocalhost&&(adminAccountBase64MD5.equals(authorization)))return3;// soft-authenticated for localhost
// authorization by hit in userDB
if(userDB.hasAdminRight((String)header.get(httpHeader.AUTHORIZATION,"xxxxxx"),((String)header.get(httpHeader.CONNECTION_PROP_CLIENTIP,"")),header.getHeaderCookies()))return4;//return, because 4=max