Support Article
Text encrypted control not supporting special characters
SA-37383
Summary
The user configured a property with type as "Text Encrypted". Pega is not converting Semi-colon ";" or Brackets "()" to "&#" followed by some numerical values. The user sees this issue in Dev, SIT, UAT and Production as well. Please provide a solution for this at the earliest.
Error Messages
Not Applicable
Steps to Reproduce
- Create a property with type as "Text Encrypted".
- Create a Access when rule.
- Configure the property in a section and give the control as "ShowTextEncryptedPropertyValue".
- Enter any text and include ; or () and save screen.
- Observe the value entered in the field. The semi-colon and brackets will get converted in "&#" followed by numerical values.
Root Cause
A defect in Pegasystems code or rules, converting the special characters to ascii and same has been displayed on UI.
Resolution
Work around steps:
- Search with the rule “decryptPropertyValue” in designer studio.
- Go to Java tab and replace the piece of java code as given below.
Current:
if (tools.getAuthorizationHandle().haveAuthorization(tools, className, null, null, raw, page)) {
returnVal = StringUtils.crossScriptingFilter(tools.getPRCrypto().decryptPropertyValue(property.getStringValue()));
}
Local-change:
if (tools.getAuthorizationHandle().haveAuthorization(tools, className, null, null, raw, page)) {
boolean escapeQuote = tools.getParamAsBoolean(ImmutablePropertyInfo.TYPE_TRUEFALSE,"EscapeQuote");
returnVal = tools.getPRCrypto().decryptPropertyValue(property.getStringValue());
}
Published May 17, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.