Examples of Sanitizer


Examples of org.apache.myfaces.tobago.sanitizer.Sanitizer

    }

    if (sanitizerClass != null) {
      try {
        final Class<? extends Sanitizer> aClass = Class.forName(sanitizerClass).asSubclass(Sanitizer.class);
        final Sanitizer sanitizer = aClass.newInstance();
        sanitizer.setProperties(sanitizerProperties);
        result.setSanitizer(sanitizer);
      } catch (Throwable e) {
        LOG.error("Can't create sanitizer: '" + sanitizerClass + "'", e);
        result.setSanitizer(new IgnoringSanitizer());
      }
View Full Code Here

Examples of org.apache.myfaces.tobago.sanitizer.Sanitizer

        }
      }
    } else { // escape="false"
      writer.writeText("", null); // to ensure the closing > of the <span> start tag.
      if ("auto".equals(out.getSanitize())) {
        final Sanitizer sanitizer = TobagoConfig.getInstance(facesContext).getSanitizer();
        text = sanitizer.sanitize(text);
      }
      writer.write(text);
    }
    if (createSpan) {
      writer.endElement(HtmlElements.SPAN);
View Full Code Here

Examples of org.apache.myfaces.tobago.sanitizer.Sanitizer

    }

    if (sanitizerClass != null) {
      try {
        final Class<? extends Sanitizer> aClass = Class.forName(sanitizerClass).asSubclass(Sanitizer.class);
        final Sanitizer sanitizer = aClass.newInstance();
        sanitizer.setProperties(sanitizerProperties);
        result.setSanitizer(sanitizer);
      } catch (Throwable e) {
        LOG.error("Can't create sanitizer: '" + sanitizerClass + "'", e);
        result.setSanitizer(new IgnoringSanitizer());
      }
View Full Code Here

Examples of org.apache.myfaces.tobago.sanitizer.Sanitizer

        }
      }
    } else { // escape="false"
      writer.writeText("", null); // to ensure the closing > of the <span> start tag.
      if ("auto".equals(out.getSanitize())) {
        final Sanitizer sanitizer = TobagoConfig.getInstance(facesContext).getSanitizer();
        text = sanitizer.sanitize(text);
      }
      writer.write(text);
    }
    if (createSpan) {
      writer.endElement(HtmlElements.SPAN);
View Full Code Here

Examples of org.apache.myfaces.tobago.sanitizer.Sanitizer

      }
      if (input instanceof UITextarea) {
        UITextarea textarea = (UITextarea) input;
        if (ComponentUtils.getDataAttribute(input, "html-editor") != null
            && "auto".equals(textarea.getSanitize())) {
          final Sanitizer sanitizer = TobagoConfig.getInstance(facesContext).getSanitizer();
          newValue = sanitizer.sanitize(newValue);
        }
      }

      input.setSubmittedValue(newValue);
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.sanitizer.Sanitizer

    }*/
    String currentValue = RenderUtils.currentValue(input);
    if (currentValue != null) {
      if (ComponentUtils.getDataAttribute(input, "html-editor") != null
          && "auto".equals(input.getSanitize())) {
        final Sanitizer sanitizer = TobagoConfig.getInstance(facesContext).getSanitizer();
        currentValue = sanitizer.sanitize(currentValue);
      }
      // this is because browsers eat the first CR+LF of <textarea>
      if (currentValue.startsWith("\r\n")) {
        currentValue = "\r\n" + currentValue;
      } else if (currentValue.startsWith("\n")) {
View Full Code Here

Examples of org.jboss.as.jdr.util.Sanitizer

    private final PluginId pluginId = new PluginId("RHQ", 1, 0, null);

    @Override
    public List<JdrCommand> getCommands() throws Exception {
        Sanitizer passwordSanitizer = Sanitizers.pattern("password=.*", "password=*****");
        return Arrays.asList(
            new RHQStatusCommand(),
            new RHQCollectFiles("bin/rhq-server.properties").sanitizer(passwordSanitizer),
            new RHQCollectFiles("logs/server.log").limit(50 * Utils.ONE_MB),
            new RHQCollectFiles("logs/server.log*").omit("logs/server.log"),
 
View Full Code Here

Examples of org.jboss.as.jdr.util.Sanitizer

    private final PluginId pluginId = new PluginId("AS7_PLUGIN", 1, 0, null);

    @Override
    public List<JdrCommand> getCommands() throws Exception {
        Sanitizer xmlSanitizer = Sanitizers.xml("//password");
        Sanitizer passwordSanitizer = Sanitizers.pattern("password=.*", "password=*");

        return Arrays.asList(
            new TreeCommand(),
            new JarCheck(),
            new CallAS7("configuration").param("recursive", "true"),
View Full Code Here

Examples of org.jboss.as.jdr.util.Sanitizer

    private final PluginId pluginId = new PluginId("AS7_PLUGIN", 1, 0, null);

    @Override
    public List<JdrCommand> getCommands() throws Exception {
        Sanitizer xmlSanitizer = Sanitizers.xml("//password");
        Sanitizer passwordSanitizer = Sanitizers.pattern("password=.*", "password=*");

        return Arrays.asList(
            new TreeCommand(),
            new JarCheck(),
            new CallAS7("configuration").param("recursive", "true"),
View Full Code Here

Examples of org.platformlayer.ops.firewall.Sanitizer

    StringBuilder sb = new StringBuilder();
    sb.append("#!/bin/bash\n");

    sb.append("# Created / managed by PlatformLayer. Do not edit.\n");
    sb.append("# __PLATFORMLAYER__METADATA__BEGIN__\n");
    Sanitizer sanitizer = new Sanitizer(Decision.Throw, '_');
    sanitizer.allowAlphanumeric();
    sanitizer.allowCharacters("!@$%^&*()[]{}_-+|<>,.");
    sanitizer.setDecision("#= ", Decision.Throw);
    for (Entry<String, String> entry : metadata.entrySet()) {
      String key = sanitizer.clean(entry.getKey());
      String value = sanitizer.clean(entry.getValue());
      sb.append("# " + key + "=" + value + "\n");
    }
    sb.append("# __PLATFORMLAYER__METADATA__END__\n");

    sb.append("set -e\n");
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.