Demo mode This site is not live. It is currently being tested and developed. Nothing on here represents an offer.
← Exit course SEC-302 Website and E-Commerce Security
Course progress, 0 of 15 parts done0%

One shop, built securely, part by part

Set up the practice web shop

One shop, built securely, part by part

Before you read the lesson

A first draft that works

Naledi Mahlangu is relaunching Table Bay Online's web shop on a new server. Palesa, a freelance developer, has written a first draft, and every page loads. Soon customers will trust it with their names, addresses and orders.

What would you want to know before it goes live?

Not just that the pages load, but that every control really works. In this course you build a practice copy of the shop yourself and prove each control with a check.

You will be able to

  • Install PHP and run its built-in server
  • Build the skeleton and create its database
  • Watch requests and cookies in the developer tools
  • Run the first checks and explain them

Three steps, in this order

  1. Build the next part securely, by hand
  2. Check that each control works, with a positive check
  3. Review fragments of a first draft and fix them

Test only your own practice shop, or systems you own or have the owner's written permission to test. Nothing else.

Unlawful access is an offence under section 2 of the Cybercrimes Act 19 of 2020

Why does the shop keep its database file outside the public folder?

  1. So SQLite reads it faster
  2. So no browser can ever download it
  3. So PHP can create it unasked
Show the answer

Only the public folder is served. A file outside it cannot be downloaded by guessing its address, even if something else in the shop goes wrong.

Now watch the video

Watch how the Network panel lists each request with its status and type, and shows its headers. You will use it to record your shop's baseline.

Watch the video