Skip to content

Commit b73e516

Browse files
author
sherif.fathy
committed
git-svn-id: http://webgoat.googlecode.com/svn/trunk@456 4033779f-a91e-0410-96ef-6bf7bf53c507
1 parent 6caa9dd commit b73e516

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

webgoat/src/main/java/org/owasp/webgoat/lessons/LogSpoofing.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public class LogSpoofing extends LessonAdapter
5858
private static final String USERNAME = "username";
5959

6060
private static final String PASSWORD = "password";
61+
6162

6263
public final static A MAC_LOGO = new A().setHref("http://www.softwaresecured.com").addElement(new IMG("images/logos/softwaresecured.gif").setAlt("Software Secured").setBorder(0).setHspace(0).setVspace(0));
6364

@@ -94,6 +95,7 @@ protected Element createContent(WebSession s)
9495
ec.addElement(t);
9596

9697
inputUsername = new String(s.getParser().getRawParameter(USERNAME, ""));
98+
9799
if (inputUsername.length() != 0)
98100
{
99101
inputUsername = URLDecoder.decode(inputUsername, "UTF-8");
@@ -107,13 +109,10 @@ protected Element createContent(WebSession s)
107109

108110
t2.addElement(row4);
109111

110-
ec.addElement(t2);
111-
112-
if (inputUsername.length() != 0
113-
&& inputUsername.toUpperCase().indexOf(
114-
System.getProperty("line.separator")
115-
+ WebGoatI18N.get("LoginSucceededForUserName")+":") >= 0)
116-
{
112+
ec.addElement(t2);
113+
114+
if (inputUsername.length() > 0 && inputUsername.indexOf('\n') >= 0 && inputUsername.indexOf('\n') >= 0)
115+
{
117116
makeSuccess(s);
118117
}
119118
} catch (UnsupportedEncodingException e)

0 commit comments

Comments
 (0)