Unable to Save Junk Notification Filter

Unable to Save Junk Notification Filter

Issue:
  1. Unable to save the Junk Notification Filter due to the CSRF parameter being passed twice in the payload.
  2. A 400 error occurs when attempting to save the configuration.
  3. The issue will occur only from 14820.
Issue ID : SD-123127

Screenshot:


Error Trace:
[12:07:28:020]|[08-12-2024]|[com.manageengine.servicedesk.filter]|[INFO]|[124]: RequestURI ::: /FilterDef.do,   method ::: POST  ,   action rule path ::: /FilterDef.do  ,   actionParamName ::: mode;   ,   actionParamValue ::: save  ,   PORTALID ::: 1|
[12:07:28:024]|[08-12-2024]|[com.adventnet.iam.security.ParameterRule]|[SEVERE]|[124]: The parameter "sdpcsrfparam" for the URL "/FilterDef.do" is more than the maximum occurances configured in the param rule :
 ParameterRule :: paramName : "sdpcsrfparam" index : "null" paramNameInRegex : "null" allowedValueRegex : "csrf_cookie_value" minLength : "0" maxLength : "200" minOccurrences : "0" maxOccurrences  : "1" isParamNameInRegex : "false" dataType : "null" xssValidation : "null" decrypt : "false" trim : "null" secret : "true" Range : "null" defaultValue : "null" template : "null" xmlSchemaValidation : "false" xmlSchemaName : "null" arraySize : "0-10" allowEmpty : "null"|
[12:07:28:027]|[08-12-2024]|[com.adventnet.iam.security.IAMSecurityException]|[INFO]|[124]: IAMSecurityException ErrorCode: MORE_THAN_MAX_OCCURANCE,  RequestURI: "/FilterDef.do", RemoteAddr: "127.0.0.1", Referrer: "https://localhost:8080/FilterDef.do?****", ParameterName: "sdpcsrfparam", No Of Occurance: "2", Parameter Rule: "ParameterRule :: paramName : "sdpcsrfparam" index : "null" paramNameInRegex : "null" allowedValueRegex : "csrf_cookie_value" minLength : "0" maxLength : "200" minOccurrences : "0" maxOccurrences  : "1" isParamNameInRegex : "false" dataType : "null" xssValidation : "null" decrypt : "false" trim : "null" secret : "true" Range : "null" defaultValue : "null" template : "null" xmlSchemaValidation : "false" xmlSchemaName : "null" arraySize : "0-10" allowEmpty : "null""|
[12:07:28:027]|[08-12-2024]|[com.adventnet.iam.security.SecurityFilter]|[SEVERE]|[124]:  IAMSecurityException Error Code : MORE_THAN_MAX_OCCURANCE |

Fix:
      Replace the provided jar in the attached zip file to address the issue. Here, the CSRF parameter is passed only once, which resolves the issue.

Note:
      Before applying the jar file, kindly verify its compatibility in the "Jar Compatibility" section below.

Steps to apply the fix:
  1. Download the attached zip file and extract it.
  2. Navigate to <SDP_Home>\lib and move the existing "SDJSPClasses.jar" file out of SDP installation folder. Then, place the 'SDJSPClasses.jar' file extracted from the zip.
  3. Restart the application service.
  4.  If the issue occurs again, recreate the issue, then immediately zip the logs (<SDP_Home>\logs folder. For eg: C:\Program Files\ManageEngine\ServiceDesk\logs folder) with full screenshot of the error received in the browser and share it with us for analysis. If the size of the log file is huge, you can send it to us using our FTP link https://bonitas2.zohocorp.com/. Select the product as "ServiceDesk Plus" and provide the proper ticket number.
Jar Compatibility:
Build
Compatible Jar
14820
14820_SDJSPClasses.zip