Examples of Escaper


Examples of com.google.appengine.repackaged.com.google.common.escape.Escaper

      throws IOException {
    HTTPRequest req =
        makeRequest(dest, COMPOSE_QUERY_STRINGS, PUT, timeoutMillis, headers);
    StringBuilder xmlContent = new StringBuilder(Iterables.size(source) * 50);
    xmlContent.append("<ComposeRequest>");
    Escaper escaper = XmlEscapers.xmlContentEscaper();
    for (String srcFileName : source) {
      xmlContent.append("<Component><Name>");
      xmlContent.append(escaper.escape(srcFileName));
      xmlContent.append("</Name></Component>");
    }
    xmlContent.append("</ComposeRequest>");
    byte[] payload = xmlContent.toString().getBytes(UTF_8);
    req.setHeader(new HTTPHeader(CONTENT_LENGTH, String.valueOf(payload.length)));
View Full Code Here

Examples of com.google.common.escape.Escaper

                if (getServletContext().getAttribute(User.NODE_APPLICATION_CONTEXT_KEY + oldNodeId) == null) {
                    // the application context associated with the node id doesn't exist so log user out.
                    SecurityContextHolder.clearContext();
                } else if (_location != null) {
                    if (oldNodeId != null && !oldNodeId.equals(nodeId)) {
                        final Escaper escaper = UrlEscapers.urlFormParameterEscaper();
                        final String location = getServletContext().getContextPath() + _location.replace("@@lang@@", escaper.escape(lang))
                                .replace("@@nodeId@@", escaper.escape(nodeId))
                                .replace("@@redirectedFrom@@", escaper.escape(redirectedFrom))
                                .replace("@@oldNodeId@@", escaper.escape(oldNodeId))
                                .replace("@@oldUserName@@", escaper.escape(user.getName()));

                        String requestURI = httpServletRequest.getRequestURI();
                        // drop the ! at the end so we can view the xml of the warning page
                        if (requestURI.endsWith("!")) {
                            requestURI = requestURI.substring(0, requestURI.length() - 1);
View Full Code Here

Examples of org.rat.free.security.makifx.base.stockpile.Escaper

        log("================================================================");
    }

    private void appendInfoToKeySecretData() throws Exception {

        Escaper esc = LooB.get().fromStock(Escaper.class);
        KeyValueMaker maker = LooB.get().fromStock(KeyValueMaker.class);

        key_secret_data.getProperties().put("id_app_common", esc.escapeValue(
                maker.doPassWithNoSpecial(32, true, true, true)
                + "."
                + dataP()
                + "."
                + System.currentTimeMillis()));

        key_secret_data.getProperties().put("makipass_version", esc.escapeValue(Constants.VERSION));
        key_secret_data.getProperties().put("creation_date", esc.escapeValue(dataP()));
        key_secret_data.getProperties().put("user_name", esc.escapeValue(System.getProperty("user.name", "undefined")));
        key_secret_data.getProperties().put("user_home", esc.escapeValue(System.getProperty("user.home", "undefined")));
        key_secret_data.getProperties().put("user_dir", esc.escapeValue(System.getProperty("user.dir", "undefined")));
    }
View Full Code Here

Examples of org.rat.free.security.makifx.core.base.stockpile.Escaper

        log("================================================================");
    }

    private void appendInfoToKeySecretData() throws Exception {

        Escaper esc = MakiDI.get().fromStock(Escaper.class);
        KeyValueMaker maker = MakiDI.get().fromStock(KeyValueMaker.class);

        key_secret_data.getProperties().put("id_app_common", esc.escapeValue(
                maker.doPassWithNoSpecial(32, true, true, true)
                + "."
                + dataP()
                + "."
                + System.currentTimeMillis()));

        key_secret_data.getProperties().put("makipass_version", esc.escapeValue(Constants.VERSION));
        key_secret_data.getProperties().put("creation_date", esc.escapeValue(dataP()));
        key_secret_data.getProperties().put("user_name", esc.escapeValue(System.getProperty("user.name", "undefined")));
        key_secret_data.getProperties().put("user_home", esc.escapeValue(System.getProperty("user.home", "undefined")));
        key_secret_data.getProperties().put("user_dir", esc.escapeValue(System.getProperty("user.dir", "undefined")));
    }
View Full Code Here

Examples of org.rat.free.security.makifx.core.base.stockpile.Escaper

        log("================================================================");
    }

    private void appendInfoToKeySecretData() throws Exception {

        Escaper esc = MakiDI.get().fromStock(Escaper.class);
        KeyValueMaker maker = MakiDI.get().fromStock(KeyValueMaker.class);

        key_secret_data.getProperties().put("id_app_common", esc.escapeValue(
                maker.doPassWithNoSpecial(32, true, true, true)
                + "."
                + dataP()
                + "."
                + System.currentTimeMillis()));

        key_secret_data.getProperties().put("makipass_version", esc.escapeValue(Constants.VERSION));
        key_secret_data.getProperties().put("creation_date", esc.escapeValue(dataP()));
        key_secret_data.getProperties().put("user_name", esc.escapeValue(System.getProperty("user.name", "undefined")));
        key_secret_data.getProperties().put("user_home", esc.escapeValue(System.getProperty("user.home", "undefined")));
        key_secret_data.getProperties().put("user_dir", esc.escapeValue(System.getProperty("user.dir", "undefined")));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.