From 94062f710a1cbf70b07a8703dbcfe37e03c97eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 11 Aug 2022 06:23:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?URL=E3=81=AF200=E6=96=87=E5=AD=97=E4=BB=A5?= =?UTF-8?q?=E5=86=85=E3=81=BE=E3=81=A7=E5=85=A5=E5=8A=9B=E5=87=BA=E6=9D=A5?= =?UTF-8?q?=E3=82=8B=E6=A7=98=E3=81=AB=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/index.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/index.php b/www/index.php index e5fa328..52ab6b8 100644 --- a/www/index.php +++ b/www/index.php @@ -29,6 +29,16 @@ exit; } + if (strlen($newadd) > 500) { + $title = '076エラー - 不正なURL'; + $h1 = '【エラー】URLは長すぎ'; + $bg = 'daityan'; + $bgpos = 'top right 100px'; + $err = 'URLは500文字以内です。'; + include_once('../views/404.php'); + exit; + } + $data = file_get_contents('links.json'); $arr = json_decode($data, true); From 346df010a022e624d11fa77e8d7f569b998517aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 11 Aug 2022 06:38:24 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/index.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/index.php b/www/index.php index 52ab6b8..d84b4b3 100644 --- a/www/index.php +++ b/www/index.php @@ -85,6 +85,14 @@ else header('Location: '.$v); exit; } + else { + $title = '076エラー - 未検出'; + $h1 = '【404】未検出'; + $bg = 'daityan'; + $bgpos = 'top right 100px'; + $err = 'このURLを見つけられませんでした。'; + include_once('../views/404.php'); + } } } else if (!isset($_GET['url']) && $_SERVER['REQUEST_URI'] == '/') {