Miscellaneous bug fixes
divide by zero, inaccurate discount and totals, reflection of user input git-svn-id: http://webgoat.googlecode.com/svn/trunk/webgoat@273 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
|
||||
|
||||
|
||||
<% String coupon = request.getParameter("coupon");
|
||||
|
||||
if (coupon.equalsIgnoreCase("PLATINUM")){
|
||||
out.print(".25");
|
||||
}
|
||||
else if (coupon.equalsIgnoreCase("GOLD")){
|
||||
out.print(".5");
|
||||
}
|
||||
else if (coupon.equalsIgnoreCase("SILVER")){
|
||||
out.print(".75");
|
||||
}
|
||||
else if (coupon.equalsIgnoreCase("BRONZE")){
|
||||
out.print(".8");
|
||||
}
|
||||
else if (coupon.equalsIgnoreCase("PRESSONE")){
|
||||
out.print(".9");
|
||||
}
|
||||
else if (coupon.equalsIgnoreCase("PRESSTWO")){
|
||||
out.print(".95");
|
||||
}
|
||||
|
||||
|
||||
|
||||
%>
|
||||
|
Reference in New Issue
Block a user