Skip to content

Commit

Permalink
added password check to url retrieval in FiewFile
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3002 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Nov 23, 2006
1 parent 8e72154 commit 8fa4a01
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions htroot/ViewFile.java
Expand Up @@ -130,6 +130,15 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
// this can be used as a simple tool to test the text parser
String urlString = post.get("url", "");
if (urlString.length() > 0) try {
// this call forces the peer to download web pages
// it is therefore protected by the admin password

if (!sb.verifyAuthentication(header, false)) {
prop.put("AUTHENTICATE", "admin log-in"); // force log-in
return prop;
}

// define an url by post parameter
url = new URL(urlString);
} catch (MalformedURLException e) {}

Expand Down

0 comments on commit 8fa4a01

Please sign in to comment.