Пример #1
0
 String getParameters() {
   String s = I18N.toDefaultEncoding(getProperty("_parameters"));
   if (TextUtils.isSubstituteExpression(s)) {
     s = TextUtils.substitute(s);
   }
   s = createFromTemplate(s);
   if (TextUtils.hasChars(s, "`;&|<>")) {
     LogManager.log(
         "Error",
         "Removed illegal characters from script monitor parameters \""
             + s
             + "\""
             + " for monitor "
             + getProperty(pName));
     s = TextUtils.removeChars(s, "`;&|<>");
   }
   return s;
 }
Пример #2
0
 public String verify(
     StringProperty stringproperty, String s, HTTPRequest httprequest, HashMap hashmap) {
   if (stringproperty == pParameters) {
     if (TextUtils.hasChars(s, "`;&")) {
       hashmap.put(stringproperty, "script parameters have illegal characters");
     }
   } else if (stringproperty == pExpression) {
     String s1 = TextUtils.legalMatchString(s);
     if (s1.length() > 0) {
       hashmap.put(stringproperty, s1);
     }
   } else if (stringproperty == pLocalScriptLocation) {
     String s2 = getProperty(pLocalScriptLocation);
     if (s2.length() == 0) {
       hashmap.put(stringproperty, "Specified local Scripts location must be non zero-length");
     }
   }
   return super.verify(stringproperty, s, httprequest, hashmap);
 }