Skip to content

Commit

Permalink
feat: Updated src/main/java/org/owasp/webgoat/less
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Jan 9, 2024
1 parent ac6ccd5 commit 8dc8989
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
Expand All @@ -42,6 +43,8 @@
@AssignmentHints(value = {"SqlStringInjectionHint5-1", "SqlStringInjectionHint5-2", "SqlStringInjectionHint5-3", "SqlStringInjectionHint5-4"})
public class SqlInjectionLesson5 extends AssignmentEndpoint {

private static final Logger logger = LoggerFactory.getLogger(SqlInjectionLesson5.class);

private final LessonDataSource dataSource;

public SqlInjectionLesson5(LessonDataSource dataSource) {
Expand Down Expand Up @@ -79,6 +82,7 @@ protected AttackResult injectableQuery(String query) {
} catch (Exception e) {
return failed(this).output(this.getClass().getName() + " : " + e.getMessage() + "<br> Your query was: " + query).build();
}
logger.info("SQL injection vulnerability in injectableQuery method of SqlInjectionLesson5 class");
}

private boolean checkSolution(Connection connection) {
Expand Down

0 comments on commit 8dc8989

Please sign in to comment.