Package opendap.servlet

Examples of opendap.servlet.BadURLException


        String logfile = params.getChildText("file").trim();

        // Security checks, this is no free proxy!!
        if (logfile.startsWith("http") || logfile.startsWith("ftp")
                || logfile.startsWith("sftp")) {
            throw new BadURLException(
                    "This is no proxy. Stopping possible hacking attempt to url: "
                            + logfile);
        }

        if (!logfile.endsWith(".log")) {
            throw new BadURLException(
                    "Strange suffix for this log file. Stopping possible hacking attempt to uri: "
                            + logfile);
        }

        if (!logfile.contains("/harvester_")) {
            throw new BadURLException(
                    "This doesn't seem like a harvester log file. Stopping possible hacking attempt to uri: "
                            + logfile);
        }

        File file = new File(logfile);
View Full Code Here

TOP

Related Classes of opendap.servlet.BadURLException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.