Package com.atlassian.bamboo.utils
Class BambooFieldValidate
java.lang.Object
com.atlassian.bamboo.utils.BambooFieldValidate
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckFieldXssSafety(@NotNull ErrorCollection errorCollection, com.atlassian.sal.api.message.I18nResolver i18nResolver, String fieldName, String fieldValue) static voidcheckFieldXssSafety(@NotNull ErrorCollection errorCollection, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) Check if field content is XSS safe.static voidcheckFieldXssSafety(@NotNull Map<String, String> fieldErrors, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) Check if field content is XSS safe.static voidcheckFieldXssSafety(org.apache.struts2.interceptor.ValidationAware validationAware, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) static ErrorCollectioncheckFieldXssSafety(org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) static booleanfindFieldRelaxedXssViolation(ErrorCollection errorCollection, com.atlassian.sal.api.message.I18nResolver i18nResolver, String fieldName, String fieldValue) static booleanfindFieldRelaxedXssViolation(ErrorCollection errorCollection, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) static booleanfindFieldShellInjectionViolation(ErrorCollection errorCollection, com.atlassian.sal.api.message.I18nResolver i18nResolver, String fieldName, @Nullable String fieldValue)
-
Method Details
-
checkFieldXssSafety
-
checkFieldXssSafety
public static ErrorCollection checkFieldXssSafety(org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) -
checkFieldXssSafety
public static void checkFieldXssSafety(@NotNull @NotNull Map<String, String> fieldErrors, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) Check if field content is XSS safe.- Parameters:
fieldErrors- if field contains XSS unsafe characters, appropriate error would be added to this maptextProvider- TextProvider beanfieldName- name of the field that is being checkedfieldValue- value of the field
-
checkFieldXssSafety
public static void checkFieldXssSafety(@NotNull @NotNull ErrorCollection errorCollection, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) Check if field content is XSS safe.- Parameters:
errorCollection- if field contains XSS unsafe characters, appropriate error would be added to this ErrorCollectiontextProvider- TextProvider beanfieldName- name of the field that is being checkedfieldValue- value of the field
-
checkFieldXssSafety
public static void checkFieldXssSafety(@NotNull @NotNull ErrorCollection errorCollection, com.atlassian.sal.api.message.I18nResolver i18nResolver, String fieldName, String fieldValue) -
findFieldRelaxedXssViolation
public static boolean findFieldRelaxedXssViolation(ErrorCollection errorCollection, org.apache.struts2.text.TextProvider textProvider, String fieldName, String fieldValue) -
findFieldRelaxedXssViolation
public static boolean findFieldRelaxedXssViolation(ErrorCollection errorCollection, com.atlassian.sal.api.message.I18nResolver i18nResolver, String fieldName, String fieldValue) -
findFieldShellInjectionViolation
public static boolean findFieldShellInjectionViolation(ErrorCollection errorCollection, com.atlassian.sal.api.message.I18nResolver i18nResolver, String fieldName, @Nullable @Nullable String fieldValue)
-