I am assigned to fix security issues on legacy code and I was given results from security scan:
Poor Error Handling: Server Error Message ( 10932 )
Basically, when the scan tries to access with some weird code:
www.mywebsite.com/myapp/jspPage.jsp?myVar=Approved%26rhppvar%3DRHPP1234
The server returns 500 error code, but I have page that displays "An error occurred" to end users.
myVar
should really only ever be "Approved" or "Rejected"
**jspPage.jsp**
String myVar= request.getParameter("myVar");
if(myVar== null)
myVar= "";
<form method="post" name="ics" action="jspPage.jsp?myVar=Approved">
I was wondering if I should be doing anything else as far as checking what gets passed to myVar
parameter?
I am not sure what the scan wants me to do...
Also, could the above form still be submitted with something other than Approved value?
Is this ok as far as not giving much information to attacker?