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

  • SEARCH
  • Home
  • 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 6998669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:26:25+00:00 2026-05-27T20:26:25+00:00

There was a question about using stripslashes and mysql_real_escape_string on a password before hashing

  • 0

There was a question about using stripslashes and mysql_real_escape_string on a password before hashing it and storing it. And the stripping or escaping before the hashing isn’t necessary as the special characters don’t carry meaning to the hashing function.

However, is it possible that certain hash results may create dangerous SQL queries?

I realize that with a sufficient hash and a salt that there’s such a small chance of this happening intentionally, but would it still be a good practice to run a strip and escape on the hashed results?

  • 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-05-27T20:26:26+00:00Added an answer on May 27, 2026 at 8:26 pm

    It would be overzealous and unnecessary to do so. Hashing functions don’t output any quotes that could introduce a SQL injection vulnerability. Also, you shouldn’t really have to use both stripslashes() and mysql_real_escape_string(). Just use mysql_real_escape_string().

    Example
    Not that I am condoning the use of MD5, but from its Wikipedia page:

    An MD5 hash is typically expressed as a 32-digit hexadecimal number.

    Hexidecimal numbers should never pose a problem with SQL injections because they just consist of /[0-9a-f]/. If you search for the hashing function that you’re using you should find something similar. You don’t need to sanitize the hash. You should be safe!

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

Sidebar

Related Questions

I know there is a question about that, but there isn't any good answer(for
I ask a question about using XPath function there But I meet a problem
I have a question about boost::shared_ptr<T> . There are lots of thread. using namespace
There's a question about using layout managers in GWT , which was however answered
I am considering using redis for asp.net mvc application, there is no question about
I know there is already a question about this but my issue is more
I'am aware there has been a generic question about a best IDE in C++
I have a simple question about Java's XML API and I hope there's a
I recently asked a question about IIf vs. If and found out that there
I have a question about this question . I posted a reply there but

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.