SQL Injection

Last post 06-24-2008 5:15 AM by shaileshk. 2 replies.
Page 1 of 1 (3 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 07-28-2006 3:01 AM

    • parveen
    • Top 500 Contributor
    • Joined on 05-12-2006
    • Kerala India
    • Posts 44

    SQL Injection


    Hello Friends,
    I have a requirement,and need to store secure data like credit card nos and its expirty dates.
    How to avoid sql injection in this case . Can u suggest How to store data...


    Thanks

    Don't take life so seriously, you will never get out of it alive.
    As our circle of knowledge expands,So does the circumference of darkness surrounding it.
  • 07-28-2006 3:07 AM In reply to

    • satya
    • Top 10 Contributor
    • Joined on 11-05-2002
    • United Kingdom
    • Posts 22,567
    • Microsoft MVP
      Moderator

    Re: SQL Injection

    http://msdn.microsoft.com/msdnmag/issues/04/09/SQLInjection/
    http://msdn.microsoft.com/msdntv/transcripts/20041104SQLServerMLTranscript.aspx
    http://www.dbazine.com/sql/sql-articles/larsen2

    fyi.


    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
    -Satya S K J

    SQL Server MVP



    Knowledge is Power, you will gain by sharing it. SSQA.net - Invisible contributions to the users & visible success in SQL Community.
  • 06-24-2008 5:15 AM In reply to

    Re: SQL Injection

     Code for preventing SQL Injection

    array_split_item = Array(”–”, “;”, “/*”, “*/”, “@@”, “@”,

                      “char”, “nchar”, “varchar”, “nvarchar”,

                      “alter”, “begin”, “cast”, “create”, “cursor”,

                      “declare”, “delete”, “drop”, “end”, “exec”,

                      “execute”, “fetch”, “insert”, “kill”, “open”,

                      “select”, “sys”, “sysobjects”, “syscolumns”,

                      “table”, “update”, “<script”, “</script>”, “‘”)

    for each item in Request.QueryString

        for array_counter = lbound(array_split_item) to ubound(array_split_item)

           

            item_postion1 = InStr(lcase(Request(item)),array_split_item(array_counter))

            ‘Response.Write(array_split_item(array_counter) & “<br>”)

           

            if item_postion1 > 0  then

                Response.Write(”Command cannot be executed.”)

                Response.End()

            end if

        next

    next

    %>

    more infomation about SQL Injection Protection

    http://codegroups.com/blog/index.php/sql-injection-protection/

Page 1 of 1 (3 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.