Resolved Fortify System Information Leak issues
[policy/engine.git] / ONAP-PAP-REST / src / main / java / org / onap / policy / pap / xacml / rest / controller / SafePolicyController.java
index 1ad304c..02d53c6 100644 (file)
@@ -38,6 +38,7 @@ import org.onap.policy.rest.dao.CommonClassDao;
 import org.onap.policy.rest.jpa.RiskType;
 import org.onap.policy.rest.jpa.SafePolicyWarning;
 import org.onap.policy.rest.jpa.UserInfo;
+import org.onap.policy.utils.PolicyUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.stereotype.Controller;
@@ -195,7 +196,7 @@ public class SafePolicyController {
                        response.setCharacterEncoding(utf8);
                        request.setCharacterEncoding(utf8);
                        PrintWriter out = response.getWriter();
-                       out.write(e.getMessage());
+                       out.write(PolicyUtils.CATCH_EXCEPTION);
                }
                return null;
        }
@@ -226,7 +227,7 @@ public class SafePolicyController {
                        response.setCharacterEncoding(utf8);
                        request.setCharacterEncoding(utf8);
                        PrintWriter out = response.getWriter();
-                       out.write(e.getMessage());
+                       out.write(PolicyUtils.CATCH_EXCEPTION);
                }
                return null;
        }
@@ -349,7 +350,7 @@ public class SafePolicyController {
                        response.setCharacterEncoding(utf8);
                        request.setCharacterEncoding(utf8);
                        PrintWriter out = response.getWriter();
-                       out.write(e.getMessage());
+                       out.write(PolicyUtils.CATCH_EXCEPTION);
                }
                return null;
        }
@@ -381,7 +382,7 @@ public class SafePolicyController {
                        response.setCharacterEncoding(utf8);
                        request.setCharacterEncoding(utf8);
                        PrintWriter out = response.getWriter();
-                       out.write(e.getMessage());
+                       out.write(PolicyUtils.CATCH_EXCEPTION);
                }
                return null;
        }