Skip to content
2 changes: 1 addition & 1 deletion WebContent/high_yield_investments.htm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h1>High Yield Investments</h1>
if any, to third party products and/or websites are purely coincidental. This site is
provided "as is" without warranty of any kind, either express or implied. Watchfire does
not assume any risk in relation to your use of this website. For additional Terms of Use,
please go to <a id="_ctl0__ctl0_HyperLink7" href="http://www.watchfire.com/statements/terms.aspx">http://www.watchfire.com/statements/terms.aspx</a>.<br /><br />
please go to <a id="_ctl0__ctl0_HyperLink7" href="https://www.watchfire.com/statements/terms.aspx">https://www.watchfire.com/statements/terms.aspx</a>.<br /><br />

Copyright &copy; 2006, Watchfire Corporation, All rights reserved.
</div>
Expand Down
4 changes: 2 additions & 2 deletions WebContent/static/inside_about.htm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>About Altoro Mutual</h1>
<ul>
<li><a href="index.jsp?content=inside_executives.htm">Executives & Management Team</a></li>
<li><a href="index.jsp?content=inside_community.htm">Community Affairs</a></li>
<li><a href="http://www.newspapersyndications.tv">Analyst Reviews</a></li>
<li><a href="https://www.newspapersyndications.tv">Analyst Reviews</a></li>
<li><a href="inside_points_of_interest.htm">Points of Interest</a></li>
</ul>

Expand All @@ -22,4 +22,4 @@ <h1>About Altoro Mutual</h1>
<span class="credit">
Altoro Mutual offers a broad range of commercial, private, retail and mortgage banking services to small- and middle-market businesses and individuals.</span>

</div>
</div>
4 changes: 2 additions & 2 deletions WebContent/static/inside_community.htm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ <h2>Summer 2006</h2>
<p>The 2006 community efforts of Altoro Mutual and our employees is quite impressive including charitable contributions, volunteerism, diversity initiatives, and other support. <a href="pr/communityannualreport.pdf">View</a> the summary report (PDF, 800KB).</p>

<p><img src="images/adobe.gif" border=0 alt="Adobe Reader"><br />
<a href="http://www.adobe.com/products/acrobat/readstep2.html">Download free Adobe Reader</a>.</p>
<a href="https://www.adobe.com/products/acrobat/readstep2.html">Download free Adobe Reader</a>.</p>

</div>
</div>
2 changes: 1 addition & 1 deletion WebContent/static/security.htm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2>Keep Your System Up to Date</h2>
<h2>Backups</h2>
<p>It is a good practice to back up important files and folders on your computer. To back up files, you can make copies onto media that you can safely store elsewhere, such as CDs or floppy discs. </p>

<p>For more information on home computer security, visit <a href="http://www.cert.org/">http://www.cert.org/</a>.</p>
<p>For more information on home computer security, visit <a href="https://www.cert.org/">https://www.cert.org/</a>.</p>
<p><a href="#top"><img alt="Back to Top" src="images/icon_top.gif" border="0" /></a>

</div>
4 changes: 2 additions & 2 deletions WebContent/swagger/lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Lexer.prototype.token = function(src, top, bq) {
if (~item.indexOf('\n ')) {
space -= item.length;
item = !this.options.pedantic
? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
? item.replace(/^ {1,}/gm, '')
: item.replace(/^ {1,4}/gm, '');
}

Expand Down Expand Up @@ -1102,7 +1102,7 @@ function replace(regex, opt) {
if (!name) return new RegExp(regex, opt);
val = val.source || val;
val = val.replace(/(^|[^\[])\^/g, '$1');
regex = regex.replace(name, val);
regex = regex.replace(new RegExp(name, 'g'), val);
return self;
};
}
Expand Down
28 changes: 17 additions & 11 deletions src/com/ibm/security/appscan/altoromutual/servlet/AdminServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)

//add account
if (request.getRequestURL().toString().endsWith("addAccount")){
String username = request.getParameter("username");
String acctType = request.getParameter("accttypes");
String username = sanitizeInput(request.getParameter("username"));
String acctType = sanitizeInput(request.getParameter("accttypes"));
if (username == null || acctType == null || username.trim().length() == 0 || acctType.trim().length() == 0)
message = "An error has occurred. Please try again later.";
else {
Expand All @@ -54,11 +54,11 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)

//add user
else if (request.getRequestURL().toString().endsWith("addUser")){
String firstname = request.getParameter("firstname");
String lastname = request.getParameter("lastname");
String username = request.getParameter("username");
String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");
String firstname = sanitizeInput(request.getParameter("firstname"));
String lastname = sanitizeInput(request.getParameter("lastname"));
String username = sanitizeInput(request.getParameter("username"));
String password1 = sanitizeInput(request.getParameter("password1"));
String password2 = sanitizeInput(request.getParameter("password2"));
if (username == null || username.trim().length() == 0
|| password1 == null || password1.trim().length() == 0
|| password2 == null || password2.trim().length() == 0)
Expand Down Expand Up @@ -87,9 +87,9 @@ else if (request.getRequestURL().toString().endsWith("addUser")){

//change password
else if (request.getRequestURL().toString().endsWith("changePassword")){
String username = request.getParameter("username");
String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");
String username = sanitizeInput(request.getParameter("username"));
String password1 = sanitizeInput(request.getParameter("password1"));
String password2 = sanitizeInput(request.getParameter("password2"));
if (username == null || username.trim().length() == 0
|| password1 == null || password1.trim().length() == 0
|| password2 == null || password2.trim().length() == 0)
Expand Down Expand Up @@ -119,5 +119,11 @@ else if (request.getRequestURL().toString().endsWith("changePassword")){
response.sendRedirect("admin.jsp");
return ;
}


private String sanitizeInput(String input) {
if (input != null) {
return input.replaceAll("[^a-zA-Z0-9]", "");
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
response.sendRedirect("login.jsp");
return;
}

//Handle the cookie using ServletUtil.establishSession(String)
try{
Cookie accountCookie = ServletUtil.establishSession(username,session);
Cookie accountCookie = ServletUtil.establishSession(username, session);
accountCookie.setHttpOnly(true);
accountCookie.setSecure(true);
response.addCookie(accountCookie);
response.sendRedirect(request.getContextPath()+"/bank/main.jsp");
}
catch (Exception ex){
response.sendRedirect(request.getContextPath() + "/bank/main.jsp");
} catch (Exception ex){
ex.printStackTrace();
response.sendError(500);
}


return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ else if (step.equals("done")){
content = "<h1>Request Out of Order</h1>"+
"<div width=\"99%\"><p>It appears that you attempted to skip or repeat some areas of this survey. Please <a href=\"survey_questions.jsp\">return to the start page</a> to begin again.</p></div>";
} else {
request.getSession().setAttribute("surveyStep", step);
String sanitizedStep = sanitizeInput(step);
request.getSession().setAttribute("surveyStep", sanitizedStep);
}
response.setContentType("text/html");
response.getWriter().write(content);
Expand Down
Loading