• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is there a regular expression i can use to search for bad characters in form submisssion

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i created a form to gather client data... I am looking for a regex that i can use to test the data i am collecting against characters that hackers use... I only want alpha numeric and normal punctuation...

something like
var specials = new RegExp(/^[a-zA-Z_0-9]$/);

is this worth the effort.

is there a better regex i can use?
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christopher Whu wrote:i created a form to gather client data... I am looking for a regex that i can use to test the data i am collecting against characters that hackers use... I only want alpha numeric and normal punctuation...

something like
var specials = new RegExp(/^[a-zA-Z_0-9]$/);

is this worth the effort.

is there a better regex i can use?



you can use form validation and use that to weed out sql injection and other hacker tactics
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic