Skip to content

Update myprofile.jsp - #24

Open
jamieallensnyk wants to merge 1 commit into
masterfrom
jamieallensnyk-patch-6
Open

Update myprofile.jsp#24
jamieallensnyk wants to merge 1 commit into
masterfrom
jamieallensnyk-patch-6

Conversation

@jamieallensnyk

Copy link
Copy Markdown
Owner

No description provided.

@jamieallensnyk

jamieallensnyk commented Jul 12, 2025

Copy link
Copy Markdown
Owner Author

Snyk checks have failed. 8 issues have been found so far.

Icon Severity Issues
Critical 0
High 8
Medium 0
Low 0

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. 8 issues have been found. (View Details)

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  SQL Injection

Unsanitized input from an HTTP parameter flows into executeQuery, where it is used in an SQL query. This may result in an SQL Injection vulnerability.

Line 16 | CWE-89 | Priority score 825 | Learn more about this vulnerability
Data flow: 6 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 - 6

rs=stmt.executeQuery("select * from users where id="+id);

⚡ Fix this issue by replying with the following command: @snyk /fix

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snyk /fix

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ No fixes found
There were no fixes found for the request

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  SQL Injection

Unsanitized input from an HTTP parameter flows into executeQuery, where it is used in an SQL query. This may result in an SQL Injection vulnerability.

Line 16 | CWE-89 | Priority score 825 | Learn more about this vulnerability
Data flow: 7 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 src/main/webapp/myprofile.jsp#L55

Step 5 - 7

ResultSet rs1=stmt.executeQuery("select * from cards where id="+id);

⚡ Fix this issue by replying with the following command: @snyk /fix

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snyk /fix

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ No fixes found
There were no fixes found for the request

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 16 | CWE-79 | Priority score 875 | Learn more about this vulnerability
Data flow: 12 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 - 7 src/main/webapp/myprofile.jsp#L55

Step 8 - 12

out.print("UserName : "+rs.getString("username")+"<br>");

⚡ Fix this issue by replying with the following command: @snyk /fix

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 16 | CWE-79 | Priority score 875 | Learn more about this vulnerability
Data flow: 12 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 - 7 src/main/webapp/myprofile.jsp#L55

Step 8 - 12

out.print("Email : "+rs.getString("email")+"<br>");

⚡ Fix this issue by replying with the following command: @snyk /fix

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 16 | CWE-79 | Priority score 875 | Learn more about this vulnerability
Data flow: 12 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 - 7 src/main/webapp/myprofile.jsp#L55

Step 8 - 12

out.print("About : "+rs.getString("about")+"<br>");

⚡ Fix this issue by replying with the following command: @snyk /fix

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 16 | CWE-79 | Priority score 875 | Learn more about this vulnerability
Data flow: 13 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 src/main/webapp/myprofile.jsp#L55

Step 5 - 8 src/main/webapp/myprofile.jsp#L63

Step 9 - 13

out.print("Card Number: "+rs1.getString("cardno")+"<br/>");

⚡ Fix this issue by replying with the following command: @snyk /fix

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 16 | CWE-79 | Priority score 875 | Learn more about this vulnerability
Data flow: 13 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 src/main/webapp/myprofile.jsp#L55

Step 5 - 8 src/main/webapp/myprofile.jsp#L63

Step 9 - 13

out.print("CVV: "+rs1.getString("cvv")+"<br/>");

⚡ Fix this issue by replying with the following command: @snyk /fix

{
Connection con=new DBConnect().connect(getServletContext().getRealPath("/WEB-INF/config.properties"));

String id=request.getParameter("id");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 16 | CWE-79 | Priority score 875 | Learn more about this vulnerability
Data flow: 13 steps

Step 1 - 3

String id=request.getParameter("id");

Step 4 src/main/webapp/myprofile.jsp#L55

Step 5 - 8 src/main/webapp/myprofile.jsp#L63

Step 9 - 13

out.print("Expiry Date: "+rs1.getString("expirydate")+"<br/>");

⚡ Fix this issue by replying with the following command: @snyk /fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant