File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
webgoat/src/main/java/org/owasp/webgoat/lessons Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ public class LogSpoofing extends LessonAdapter
58
58
private static final String USERNAME = "username" ;
59
59
60
60
private static final String PASSWORD = "password" ;
61
+
61
62
62
63
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 ));
63
64
@@ -94,6 +95,7 @@ protected Element createContent(WebSession s)
94
95
ec .addElement (t );
95
96
96
97
inputUsername = new String (s .getParser ().getRawParameter (USERNAME , "" ));
98
+
97
99
if (inputUsername .length () != 0 )
98
100
{
99
101
inputUsername = URLDecoder .decode (inputUsername , "UTF-8" );
@@ -107,13 +109,10 @@ protected Element createContent(WebSession s)
107
109
108
110
t2 .addElement (row4 );
109
111
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
+ {
117
116
makeSuccess (s );
118
117
}
119
118
} catch (UnsupportedEncodingException e )
You can’t perform that action at this time.
0 commit comments