added password check to url retrieval in FiewFile

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3002 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 8e7215475b
commit 8fa4a01c38

@ -130,6 +130,15 @@ public class ViewFile {
// 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) {}

Loading…
Cancel
Save