<%@ page import="org.baraza.web.*" %> <%@ page import="org.baraza.xml.BElement" %> <% ServletContext context = getServletContext(); String dbconfig = "java:/comp/env/jdbc/database"; String xmlcnf = request.getParameter("xml"); if(request.getParameter("logoff") == null) { if(xmlcnf == null) xmlcnf = (String)session.getAttribute("xmlcnf"); if(xmlcnf == null) xmlcnf = context.getInitParameter("config_file"); if(xmlcnf != null) session.setAttribute("xmlcnf", xmlcnf); } String ps = System.getProperty("file.separator"); String xmlfile = context.getRealPath("WEB-INF") + ps + "configs" + ps + xmlcnf; String reportPath = context.getRealPath("reports") + ps; String userIP = request.getRemoteAddr(); String userName = request.getRemoteUser(); BWeb web = new BWeb(dbconfig, xmlfile); web.setUser(userIP, userName); web.init(request); BElement root = web.getRoot(); %> <%@ include file="/resources/include/init.jsp" %>
<% String myoutput = ""; if(request.getParameter("Update") != null) { String oldpassword = request.getParameter("oldpassword"); String newpassword = request.getParameter("newpassword"); String confpassword = request.getParameter("confpassword"); if(newpassword == null) newpassword = ""; if(!newpassword.equals(confpassword)) { myoutput = "\n"; } else { String fnct = root.getAttribute("password"); String mysql = "SELECT " + fnct + "('" + web.getUserID() + "', '" + oldpassword + "','"; mysql += newpassword + "')"; myoutput = "\n"; } } %> <%= myoutput %>
The is a password mismatch beween the new and confirmed password.
" + web.executeFunction(mysql) + ".
Old Password :
New Password :
Confirm Passord :
<%@ include file="/resources/include/footer.jsp" %>