• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Skool. Stay in. Smartness. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!