diff -urN punbb-1.2.10/upload/header.php punbb-1.2.11/upload/header.php
--- punbb-1.2.10/upload/header.php	Thu Jul  7 17:48:00 2005
+++ punbb-1.2.11/upload/header.php	Tue Feb 28 19:20:26 2006
@@ -131,7 +131,7 @@
 
 
 // START SUBST - <pun_page>
-$tpl_main = str_replace('<pun_page>', basename($_SERVER['PHP_SELF'], '.php'), $tpl_main);
+$tpl_main = str_replace('<pun_page>', htmlspecialchars(basename($_SERVER['PHP_SELF'], '.php')), $tpl_main);
 // END SUBST - <pun_title>
 
 
diff -urN punbb-1.2.10/upload/install.php punbb-1.2.11/upload/install.php
--- punbb-1.2.10/upload/install.php	Tue Nov  1 00:31:04 2005
+++ punbb-1.2.11/upload/install.php	Tue Feb 28 19:23:46 2006
@@ -24,7 +24,7 @@
 
 
 // The PunBB version this script installs
-$punbb_version = '1.2.10';
+$punbb_version = '1.2.11';
 
 
 define('PUN_ROOT', './');
diff -urN punbb-1.2.10/upload/register.php punbb-1.2.11/upload/register.php
--- punbb-1.2.10/upload/register.php	Tue Aug 30 01:45:44 2005
+++ punbb-1.2.11/upload/register.php	Tue Feb 28 19:21:40 2006
@@ -79,6 +79,13 @@
 
 else if (isset($_POST['form_sent']))
 {
+	// Check that someone from this IP didn't register a user within the last hour (DoS prevention)
+	$result = $db->query('SELECT 1 FROM '.$db->prefix.'users WHERE registration_ip=\''.get_remote_address().'\' AND registered>'.(time() - 3600)) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
+
+	if ($db->num_rows($result))
+		message('A new user was registered with the same IP address as you within the last hour. To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience.');
+
+
 	$username = pun_trim($_POST['req_username']);
 	$email1 = strtolower(trim($_POST['req_email1']));
 
