danger of online dating sites - Validating postcodes php

This article treats an HTML page like a template, with slots where a developer is allowed to put untrusted data.

Given the way browsers parse HTML, each of the different types of slots has slightly different security rules.

When you put untrusted data into these slots, you need to take certain steps to make sure that the data does not break out of that slot into a context that allows code execution.

In a way, this approach treats an HTML document like a parameterized database query - the data is kept in specific places and is isolated from code contexts with escaping.

This document sets out the most common types of slots and the rules for putting untrusted data into them safely.

Based on the various specifications, known XSS vectors, and a great deal of manual testing with all the popular browsers, we have determined that the rule proposed here are safe.

The slots are defined and a few examples of each are provided.

Developers SHOULD NOT put data into any other slots without a very careful analysis to ensure that what they are doing is safe.

Browser parsing is extremely tricky and many innocuous looking characters can be significant in the right context.

HTML entity encoding is okay for untrusted data that you put in the body of the HTML document, such as inside a tag.

Tags: , ,