From 677b7454a37a0152f50d40993460d8f5a071e181 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 5 Mar 2013 14:17:08 -0800 Subject: Map editor 0.1! --- index.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 9a5f7d7..f909306 100644 --- a/index.php +++ b/index.php @@ -212,6 +212,10 @@ switch ($request) { require 'pages/chat.php'; break; + case "mapeditor": + require 'pages/mapeditor.php'; + break; + case "admin": if ($_SESSION['isAdmin'] == true) { require 'pages/admin.php'; -- cgit v1.2.3 From 81596179bcfc00b7428e238ab619875e7accb52a Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 6 Mar 2013 01:45:59 -0800 Subject: Chat Pretty Redirect --- index.php | 11 ++++++-- pages/chat.php | 3 +++ redirect.php | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 redirect.php (limited to 'index.php') diff --git a/index.php b/index.php index f909306..49793a0 100644 --- a/index.php +++ b/index.php @@ -99,8 +99,15 @@ switch ($request) { break; case "redirect": - $to = $_GET['to']; - DoRedirect("THIS URL COULD BE UNSAFE! Please confirm!
", $to, $duration = "8"); + //Whitelist things? + if (true) { + require('redirect.php'); + } else { + //Redirect instantly: + $to = $_GET['to']; + DoRedirect(NULL, $to, $duration = "0"); + } + exit; break; case "hometutorial": diff --git a/pages/chat.php b/pages/chat.php index f2d2231..d2198c7 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -162,6 +162,9 @@ function chatReplaceAndEncode(chat) { //Replace # in the URL with %23 chat = chat.replace(//ig, ""); + chat = chat.replace(//ig, ""); + //Making the bet that not all browsers do the same: + chat = chat.replace(//ig, ""); return chat; } diff --git a/redirect.php b/redirect.php new file mode 100644 index 0000000..e010d94 --- /dev/null +++ b/redirect.php @@ -0,0 +1,83 @@ + + + + +Pathery.com - Redirecting... + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3