diff --git a/ring/index.php b/ring/index.php index d8d3f0a..b31aafa 100644 --- a/ring/index.php +++ b/ring/index.php @@ -6,7 +6,11 @@ $users = array_map(function ($f) { return basename(dirname($f)); }, glob("/home/ if ($action !== "index") { // handle webring redirects $me = $_GET["me"] ?? ""; - $i = array_search($me, $users) ?? 0; + if (!in_array($me, $users) && $action != "random") { + header("Location: https://tilde.team/ring/?error"); + die(); + } + $i = array_search($me, $users); switch ($action) { case "random": @@ -50,6 +54,9 @@ else { include __DIR__ . '/../header.php'; ?>

how to join the webring

+ + +

this webring can be joined by any user on tilde.team.

first, add the following links to your page, replacing USERNAME by your username (no ~):