Skip to content
Tweak Your Biz home.
MENUMENU
  • Home
  • Categories
    • Reviews
    • Business
    • Finance
    • Technology
    • Growth
    • Sales
    • Marketing
    • Management
  • Who We Are

Securing your website by handling errors

By Richie Bowden Published April 20, 2010 Updated December 1, 2022

Recently, I wrote the

Error messages can provide detailed information and in the wrong hands…

Error messages, by default, are designed to provide all the necessary information to help resolve the error. However, in the wrong hands, this type of content can provide ‘valuable’ information on how the website operates in addition to access to privacy related information on customers and transactions.

Using this sample database error message from a blog by Securiteam on sql injection as an example; by causing the error, a hacker can see that the first table name in the database  is called ‘admin_login’.

Microsoft OLE DB Provider for ODBC Drivers error ‘80040e07’
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value ‘admin_login’ to a column of data type int.
/index.asp, line 5

With a subsequent query, it can be possible to start to extract the column names of this table, as the example shows the column name ‘login_id’.

Microsoft OLE DB Provider for ODBC Drivers error ‘80040e07’
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value ‘login_id’ to a column of data type int.
/index.asp, line 5

In this example, with the names of the table and columns, it would be possible for a hacker to easily get access to login ids and passwords for the website.

The best defence is…

The best place to start to ensure that any error messages are handled securely is when the website is being designed and developed. As the website requirements are being discussed, any related exceptions that may cause an error should also be documented.

For example, in the previous website security blog I discussed the importance of data validation to ensure that no inappropriate data inputs could be used to attack a website. In such a scenario, rather than having the website failing and producing an internal error message such as in the above example, a user friendly message should be displayed, indicating the expected format and length of input.

Test and test again…

During the testing of the website, security testing using different attack scenarios should be completed to test the strength of your website by simulating a series of different attack methods and reviewing the results to detect and correct any weaknesses. These penetration testing scenarios should cover both typical attack methods, along with any unexpected attacks or errors. To ensure that the ‘unexpected’ errors are tested, brainstorming sessions involving developers and business owners who know their user community will be necessary, where the focus is on uncovering any unusual and unexpected user actions.

Fail safe is key

When designing the website, an important principle to include is to ensure that if an error occurs, sufficient information is provided to guide the user with no information on any server or software related topics (i.e. the website has ‘failed’ into a safe mode). In addition, all errors should be handled in a structured manner, so that irrespective where an error occurs on a website, the response is the same and managed in a consistent manner. Check your site's business logic to ensure no weaknesses

Business logic not the code can be the problem

When reviewing your website for potential weaknesses, it’s more important to assess the logic of your workflows, as the logic is the foundation for your code. The logic is driven by the business rules of the functions being provided by the website. Two examples of possible mis-use of logic include;

  • The provision of a password reminder function to assist legitimate users who may have forgotten their passwords. To ensure that such a function is not abused by a hacker, a captcha function can be included to prevent any brute force attacks.
  • The assumption that a withdrawal amount entered into an online banking service will be positive, thus leaving the possibility that a negative amount will trigger a credit to a person’s account. A data validation check on the entered value should resolve this potential weakness

As with all security principles, if time and effort is put in at the early stages of a website or application, it provides the foundation for a secure website. So in the enthusiasm to get your website live, taking some time at the start to ensure that any potential weaknesses are removed and that any unexpected errors are managed in a fail-safe manner is well worth the investment.

Posted in Business

Enjoy the article? Share it:

  • Share on Facebook
  • Share on X
  • Share on LinkedIn
  • Share on Email

Richie Bowden

Richard is a believer and advises companies on the use of Cloud services, Agile and Lean start-up principles. His focus is on innovative solutions that bring practical business benefits.

He has over 18 years experience in a variety of IT roles, including over 10 years management experience working for companies such as IBM Software, Oracle & KPMG Consulting. In his various roles, his focus has been on rolling out innovative IT solutions and services, using user centered design to deliver practical business benefits.

Richie is a PMI certified Project Management Professional and a certified Scrummaster.

Visit author twitter pageContact author via email

View all posts by Richie Bowden

Signup for the newsletter

Sign For Our Newsletter To Get Actionable Business Advice

* indicates required
Contents
Error messages can provide detailed information and in the wrong hands…
The best defence is…
Test and test again…
Fail safe is key
Business logic not the code can be the problem

Related Articles

Business
Technology

Beyond the Hype: Former AT&T and Synchronoss CEO Glenn Lurie on What the $4 Billion GenAI Telecom Market Really Means for 2025

Jessica Jones August 15, 2025
Business
Technology

How AI Mockup Generators Provide First-Mover Advantage

James Harding August 14, 2025
Business
Management

Best 12 LMS Features for Restaurants Staff Training That Reduces Turnover

Andrew Larson August 14, 2025

Footer

Tweak Your Biz
Visit us on Facebook Visit us on X Visit us on LinkedIn

Privacy Settings

Company

  • Contact
  • Terms of Service
  • Privacy Statement
  • Accessibility Statement
  • Sitemap

Signup for the newsletter

Sign For Our Newsletter To Get Actionable Business Advice

* indicates required

Copyright © 2025. All rights reserved. Tweak Your Biz.

Disclaimer: If you click on some of the links throughout our website and decide to make a purchase, Tweak Your Biz may receive compensation. These are products that we have used ourselves and recommend wholeheartedly. Please note that this site is for entertainment purposes only and is not intended to provide financial advice. You can read our complete disclosure statement regarding affiliates in our privacy policy. Cookie Policy.

Tweak Your Biz
Sign For Our Newsletter To Get Actionable Business Advice
[email protected]