Firestorm Web Hosting: UK Web Hosting, Domain Registration, Email & Database Systems

Control Panel  |  Sign Up  |  FAQs  |  Terms

You Are Here   »  Support Home  »  Website Security  
FTP

 Website Security

Importance?
Website security is of major importance to website owners and the people who are  using the websites. As a site owner you are responsible for ensuring that your users are able to view your website without the risk of problems associated with malware, viruses and trojans.

At Firestorm we are committed to providing a safer more secure experience for all users of the internet, so we have constructed this section to offer some basic advice on simple but effective website security.

Common Mistakes?
One of the most common problems with websites is the lack of validation when accepting user input. Ie. you may have a web page that is accepting a users email address and password, in order for them to login to your website.

When accepting this input, it is essential that the data received is analysed and 'cleaned', so it is free from any potentially harmful characters.

Below you can see some simple but effective methods for 'cleaning' user input.

ASP Example PHP Example Javascript Example
ASP Example  
 

<%Function BurnBadInput (rVar,rType)
Set regEx = New RegExp
regEx.Global = true
regEx.Pattern = "[^0-9a-zA-Z\@\w\.\,\-\_\b\r\ \-]"
IF rType  = "querystring" THEN
BurnBadInput = regEx.Replace(request.querystring(rVar), "")
ELSEIF rType  = "form" THEN
BurnBadInput = regEx.Replace(request.form(rVar), "")
ELSEIF rType  = "cookie" THEN
BurnBadInput = regEx.Replace(request.cookies(rVar), "")
ELSEIF rType  = "string" THEN
BurnBadInput = regEx.Replace(rVar, "")
END IF
End Function%>

Using This Example  
 

Using this function to cleanse your querystring, form, cookie or string data is simple. Firstly you place the code above into the HEAD section of your page and then you call the querystring or form as shown.

Instead of:

<% User_Input = request.querystring("EXAMPLE") %>

You request the input using the function, as shown:

<% User_Input = BurnBadInput("EXAMPLE","querystring") %>

You can cleanse other request types such as FORM, COOKIE, or plain STRING as shown below:

<% User_Input = BurnBadInput("EXAMPLE","form") %>

Related

 Related Articlesles

Was This Article Helpful?
 Yes
 No
 Not Sure

Refreshing Web Design

 Powerful Hosting ?


All of our hosting packages come with the following features as standard.

  • Unlimited Bandwidth
  • Online Account Control
  • Instant Setup
  • Webmail Access
  • FTP Access
Online Support

 Advert

Website Security Essentials

 Security Essentials

Website security has become an important consideration for anyone who own or runs a website. Secure your website now by downloading the latest version of our renowned website security Firefile ®

More About Security
Web Hosting  |  Register Domains  |  Email Services  |  Databases  |  Support  |  Contact  |  Terms & Conditions  |  FAQs   Accepted payment methods
Copyright © 2008-2012 Firestorm Online Ltd  |  All Rights Reserved  |  Company Reg: 06654958