Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Encrypting query string to prevent sql injection

Encrypting query string to prevent sql injection

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ChrisFarrugia
    wrote on last edited by
    #1

    Dear all, From your experiences, does encrypting the query string help in preventing sql injection? Thanks a lot, Chris

    M 1 Reply Last reply
    0
    • C ChrisFarrugia

      Dear all, From your experiences, does encrypting the query string help in preventing sql injection? Thanks a lot, Chris

      M Offline
      M Offline
      Mark J Miller
      wrote on last edited by
      #2

      It seems to me the wrong solution to the problem. To prevent injection attacks you should be using parameters for all values. If you are dynamically building strings you shouldn't be using direct user input. This will protect your sql stamtents at the level they should be. If an attacker finds away around your protections they you're subject to attacks all over again. Properly written sql is the only way to prevent against attacks - parameters and never concatenating user input into your strings.

      Mark's blog: developMENTALmadness.blogspot.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups