Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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
 
I am mighty! And this is a mighty small ad:
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!