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 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... + + + + + + + + + + +
+

You are being redirected in 5 seconds

+

Let's go!:

+ +

Back to: +

+
+ + + \ No newline at end of file -- cgit v1.2.3