From 6013a9ccfe11df717d3584f93feba89c1171117d Mon Sep 17 00:00:00 2001 From: liviana-ro Date: Fri, 12 Jun 2026 15:56:59 +0300 Subject: [PATCH 1/2] test test2 --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7a67b8cd71..425f47a185 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,8 @@ todolist-goof log4shell-goof - pom + test + pom From fce517ecc535d6f506ac8e1b39d4cbc1fd32cdd7 Mon Sep 17 00:00:00 2001 From: liviana-ro Date: Tue, 4 Aug 2026 09:59:22 +0300 Subject: [PATCH 2/2] Implement feedback retrieval in AboutAction Added feedback handling and database search functionality. --- .../todolist/web/action/AboutAction.java | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/todolist-goof/todolist-web-struts/src/main/java/io/github/benas/todolist/web/action/AboutAction.java b/todolist-goof/todolist-web-struts/src/main/java/io/github/benas/todolist/web/action/AboutAction.java index 01e6b24d0c..0cfb784338 100644 --- a/todolist-goof/todolist-web-struts/src/main/java/io/github/benas/todolist/web/action/AboutAction.java +++ b/todolist-goof/todolist-web-struts/src/main/java/io/github/benas/todolist/web/action/AboutAction.java @@ -21,21 +21,50 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - package io.github.benas.todolist.web.action; import com.opensymphony.xwork2.ActionSupport; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; + /** * Action class to redirect to about page. * * @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com) */ public class AboutAction extends ActionSupport { + public static final String ACTIVE = "active"; + private String feedback; + public String getAboutTabStyle() { return ACTIVE; } + public String getFeedback() { + return feedback; + } + + public void setFeedback(String feedback) { + this.feedback = feedback; + } + + public String execute() throws Exception { + if (feedback != null) { + searchFeedback(feedback); + } + return SUCCESS; + } + + private ResultSet searchFeedback(String keyword) throws Exception { + Connection connection = DriverManager.getConnection( + "jdbc:h2:mem:todolist", "sa", ""); + Statement statement = connection.createStatement(); + String sql = "SELECT * FROM feedback WHERE comment = '" + keyword + "'"; + return statement.executeQuery(sql); + } }