Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8089595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:26:48+00:00 2026-06-05T19:26:48+00:00

I am fixing code for the audit report for security issue– SQL Injection. In

  • 0

I am fixing code for the audit report for security issue– SQL Injection.
In my code the following method is used extensively to delete records.
The method is defined in a Base Class and is extended by every other dao level class in the module.

public void delete(Class objectClass, long objectId)throws DAOException{
        try{
            getHibernateTemplate().delete(getObject(objectClass,objectId));
        }catch(Exception e){
            throw new DAOException(e);
        }
    }

And, the method call
getHibernateTemplate().delete(getObject(objectClass,objectId));

is reported to be prone to SQL Injection. Reported like

“Injection of data received from servlet request (“getObject(objectClass,objectId)”) to User Defined Dangerous”.

How to fix the issue.
I have done sufficient homework and had already fixed some more SQL Injection issue by prepared statement in HQL.

Thanks in Advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:26:50+00:00Added an answer on June 5, 2026 at 7:26 pm

    ANSWER — This method in itself use binding parameters and can be verified by Log4j api. I have verified the logs for the binding parameters and SQL injection for this issue is not feasible

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when fixing mass spelling errors in my code base i have used this: find
I have the following code. I need help fixing it such that the Category
Could you help me in fixing the compile error in the following code: #include
I am fixing some printing (plotter) problems in our java code(windows 32). The paper
i have this php code and keep on getting errors upon fixing each error.
We're doing some code cleanup, fixing signed/unsigned comparisons, running static analysis, etc, on the
Can anyone explain why the alert() in the following JavaScript code is firing? It
I have the following code: //------------------------------------------------------// // When the document is ready, start firing
I am working on fixing older code for my job. It is currently written
I have been struggling in fixing this code, wonder what is wrong at all...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.