ESCAPING USER ENTERED CHARACTERS.

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ESCAPING USER ENTERED CHARACTERS.

    Hi
    I have some blind users who use voice translation software to enter data
    into an MSQL 2000 db using ASP (Web)
    Occasionally I get ' or other puctuation characters that fail the inserts or
    updates.

    I handle these using the replace function but some still get through !!!

    Is there a list of escape characters I should handle differently and can
    someone offer (help) with a asp function that covers most if not all those
    pesky charcaters.

    Regards
    Don Grover

    ps. Its hard getting them to read error screens, i'd rather cover better
    initially.


    Don Grover Guest

  2. Similar Questions and Discussions

    1. Escaping special characters
      How do I escape ' and other special characters? I use addslashes but that does not seem to prevent the MSSQL db from complianing. Please help. ...
    2. Escaping characters
      I want to make a variable holding the string a href="#" onClick="alert('Are you sure you want to quit?')") But if I do <cfset theURL = "a...
    3. SOS! To validate if form field entered by user is validnumber (not a negative value)
      Pls see my question as below... gclausen, This is actually a school assignment, which doesn't allow the use of Javascript. Anyone can help,...
    4. Escaping characters in MySQL
      CFMX works fine with MySQL database 99% of the time. However, when a field in a query includes an apostrophe, CF is escaping it in the Windows SQL...
    5. Compare user entered password with AD
      Mike I posted some code that might help you out .. look for VB.NET LDAP Class here in this group. Good luck Jon "Mike Moore"...
  3. #2

    Default Re: ESCAPING USER ENTERED CHARACTERS.

    Hi

    Two things:
    a) you should not try to look for malicious characters - you should filter
    by using known *good* characters. Everything else should be stripped,
    replaced, or an error generated

    b) If you use the ADO Command Object, and append Parameter objects, then ADO
    will take take of escaping all values for you.

    Cheers
    Ken


    "Don Grover" <spamfree@assoft.com.au> wrote in message
    news:e%23OnO8dJEHA.952@TK2MSFTNGP12.phx.gbl...
    : Hi
    : I have some blind users who use voice translation software to enter data
    : into an MSQL 2000 db using ASP (Web)
    : Occasionally I get ' or other puctuation characters that fail the inserts
    or
    : updates.
    :
    : I handle these using the replace function but some still get through !!!
    :
    : Is there a list of escape characters I should handle differently and can
    : someone offer (help) with a asp function that covers most if not all those
    : pesky charcaters.
    :
    : Regards
    : Don Grover
    :
    : ps. Its hard getting them to read error screens, i'd rather cover better
    : initially.
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: ESCAPING USER ENTERED CHARACTERS.

    Hi Ken
    170 Forms and many fields of various types,.
    I have filtered most with Javascript at client and Vbscript at Server side,
    its too bigger job to modify for so many forms and user input fields.
    So thats why I was asking the question i did, so im still looking for a
    definitive resource.

    Don

    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:OxYA5QfJEHA.3380@TK2MSFTNGP09.phx.gbl...
    > Hi
    >
    > Two things:
    > a) you should not try to look for malicious characters - you should filter
    > by using known *good* characters. Everything else should be stripped,
    > replaced, or an error generated
    >
    > b) If you use the ADO Command Object, and append Parameter objects, then
    ADO
    > will take take of escaping all values for you.
    >
    > Cheers
    > Ken
    >
    >
    > "Don Grover" <spamfree@assoft.com.au> wrote in message
    > news:e%23OnO8dJEHA.952@TK2MSFTNGP12.phx.gbl...
    > : Hi
    > : I have some blind users who use voice translation software to enter data
    > : into an MSQL 2000 db using ASP (Web)
    > : Occasionally I get ' or other puctuation characters that fail the
    inserts
    > or
    > : updates.
    > :
    > : I handle these using the replace function but some still get through !!!
    > :
    > : Is there a list of escape characters I should handle differently and can
    > : someone offer (help) with a asp function that covers most if not all
    those
    > : pesky charcaters.
    > :
    > : Regards
    > : Don Grover
    > :
    > : ps. Its hard getting them to read error screens, i'd rather cover better
    > : initially.
    > :
    > :
    >
    >

    Don Grover Guest

  5. #4

    Default Re: ESCAPING USER ENTERED CHARACTERS.

    What do you mean "definitive" resource?

    The definitive way of securing your app is:
    a) filter on Known Good Input - there are waaaay to many other possible
    characters. Consider how many languages there are, and how many different
    character sets there are (to support those languages), and thus how many
    different types of ' there are. Are you going to filter for them all? That's
    insane. :-)

    b) use Command objects, and Parameter objects. If you have lots of data
    access code scattered all over the place, then it's time to refactor your
    code. You should attempt to centralise as much of this as possible, eg in
    some kind of data access layer. That would make it easier to switch

    c) if you want a decent methodology for developing your pages that doesn't
    involve classes, and DALs an so forth, try my website:
    [url]www.adopenstatic.com/resources/code/UIValidation.asp[/url]

    That said, I think you're going to have to refactor your application sooner
    or later. Better sooner before you end up with an even bigger problem that
    you can't "code around"

    Cheers
    Ken


    "Don Grover" <spamfree@assoft.com.au> wrote in message
    news:eipV2ChJEHA.3688@TK2MSFTNGP10.phx.gbl...
    : Hi Ken
    : 170 Forms and many fields of various types,.
    : I have filtered most with Javascript at client and Vbscript at Server
    side,
    : its too bigger job to modify for so many forms and user input fields.
    : So thats why I was asking the question i did, so im still looking for a
    : definitive resource.
    :
    : Don
    :
    : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    : news:OxYA5QfJEHA.3380@TK2MSFTNGP09.phx.gbl...
    : > Hi
    : >
    : > Two things:
    : > a) you should not try to look for malicious characters - you should
    filter
    : > by using known *good* characters. Everything else should be stripped,
    : > replaced, or an error generated
    : >
    : > b) If you use the ADO Command Object, and append Parameter objects, then
    : ADO
    : > will take take of escaping all values for you.
    : >
    : > Cheers
    : > Ken
    : >
    : >
    : > "Don Grover" <spamfree@assoft.com.au> wrote in message
    : > news:e%23OnO8dJEHA.952@TK2MSFTNGP12.phx.gbl...
    : > : Hi
    : > : I have some blind users who use voice translation software to enter
    data
    : > : into an MSQL 2000 db using ASP (Web)
    : > : Occasionally I get ' or other puctuation characters that fail the
    : inserts
    : > or
    : > : updates.
    : > :
    : > : I handle these using the replace function but some still get through
    !!!
    : > :
    : > : Is there a list of escape characters I should handle differently and
    can
    : > : someone offer (help) with a asp function that covers most if not all
    : those
    : > : pesky charcaters.
    : > :
    : > : Regards
    : > : Don Grover
    : > :
    : > : ps. Its hard getting them to read error screens, i'd rather cover
    better
    : > : initially.
    : > :
    : > :
    : >
    : >
    :
    :


    Ken Schaefer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139