diff --git a/abi/addabi.php b/abi/addabi.php index 4373e81..85e4d80 100644 --- a/abi/addabi.php +++ b/abi/addabi.php @@ -1,4 +1,5 @@ false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } $abidate = date("Y-m-d H:i:s"); @@ -105,21 +113,17 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['abitext'])) && s } if ($res) { - header('Content-Type: application/json'); echo json_encode(['success' => true]); exit; } else { - header('Content-Type: application/json'); echo json_encode(['success' => false, 'error' => '追加に失敗しました。']); exit; } } catch(PDOException $e) { - header('Content-Type: application/json'); echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]); exit; } }else{ - header('Content-Type: application/json'); echo json_encode(['success' => false, 'error' => 'すでに追記済みです。']); exit; } diff --git a/addauthcode.php b/addauthcode.php index 9d93e5f..e7e4130 100644 --- a/addauthcode.php +++ b/addauthcode.php @@ -33,7 +33,12 @@ $res = null; $option = null; -$userid = $_SESSION['userid']; +if( !empty($_SESSION['userid']) ) { + $userid = $_SESSION['userid']; +}else{ + header("Location: login.php"); + exit; +} try { diff --git a/authcodechk.php b/authcodechk.php index 039149f..6c799a8 100644 --- a/authcodechk.php +++ b/authcodechk.php @@ -28,7 +28,12 @@ $res = null; $option = null; -$userid = $_SESSION['userid']; +if( !empty($_SESSION['userid']) ) { + $userid = $_SESSION['userid']; +}else{ + header("Location: login.php"); + exit; +} // データベースに接続 diff --git a/authlogin.php b/authlogin.php index cc728cf..34115db 100644 --- a/authlogin.php +++ b/authlogin.php @@ -36,8 +36,12 @@ session_set_cookie_params([ session_start(); session_regenerate_id(true); -$userid = $_SESSION['userid']; - +if( !empty($_SESSION['userid']) ) { + $userid = $_SESSION['userid']; +}else{ + header("Location: login.php"); + exit; +} try { $option = array( @@ -61,8 +65,20 @@ if(!($is_login === false)){ exit; } //------------------------------------------------------------- +//パスワード試行回数制限------------------------------------------- +if (!isset($_SESSION['login_passtry'])) { + $_SESSION['login_passtry'] = 0; +} +//------------------------------------------------------------- if( !empty($_POST['btn_submit']) ) { + if ($_SESSION["login_passtry"] <= 5) { + $delay = $_SESSION["login_passtry"] * 2; + } else { + $delay = min(pow(2, $_SESSION["login_passtry"] - 2), 60); + } + sleep($delay); + $useragent = safetext($_SERVER['HTTP_USER_AGENT']); $device = UserAgent_to_Device($useragent); @@ -170,6 +186,7 @@ if( !empty($_POST['btn_submit']) ) { $_SESSION['username'] = $username; $_SESSION['password'] = null; + $_SESSION["login_passtry"] = 0; // リダイレクト先のURLへ転送する $url = '/home'; @@ -178,6 +195,7 @@ if( !empty($_POST['btn_submit']) ) { // すべての出力を終了 exit; }else{ + $_SESSION["login_passtry"]++; $error_message[] = "そのバックアップコードは使用できません。(BACKUPCODE_DAME)"; } }else{ @@ -270,7 +288,8 @@ if( !empty($_POST['btn_submit']) ) { $_SESSION['loginkey'] = $userLoginKey; $_SESSION['username'] = $username; - $_SESSION['password'] = null; + $_SESSION['password'] = null; + $_SESSION["login_passtry"] = 0; // リダイレクト先のURLへ転送する $url = '/home'; @@ -280,6 +299,7 @@ if( !empty($_POST['btn_submit']) ) { exit; }else { + $_SESSION["login_passtry"]++; $error_message[] = '二段階認証が出来ませんでした。再度お試しください。(AUTHCODE_CHECK_DAME)'; } } diff --git a/bookmark/bookmark.php b/bookmark/bookmark.php index df9c410..4f8e7f8 100644 --- a/bookmark/bookmark.php +++ b/bookmark/bookmark.php @@ -1,12 +1,20 @@ false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } try { $option = array( @@ -48,10 +56,10 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa $index = array_search($postUniqid, $bookmarkList); if ($index === false) { - // ユーザーIDを追加 + // UniqIDを追加 $bookmarkList[] = $postUniqid; } else { - // ユーザーIDを削除 + // UniqIDを削除 array_splice($bookmarkList, $index, 1); } diff --git a/bookmark/index.php b/bookmark/index.php index f9429f3..c5fdfb7 100644 --- a/bookmark/index.php +++ b/bookmark/index.php @@ -465,57 +465,56 @@ $(document).ready(function () { }); //--------------------リユーズ--------------- - $(document).on('click', '#quote_reuse_btn', function (event) { - var modalMain = $('.modal-content'); - var reuseModal = $('#myQuoteReuseModal'); + $(document).on('click', '#quote_reuse_btn', function (event) { + var modalMain = $('.modal-content'); + var reuseModal = $('#myQuoteReuseModal'); - reuseModal.show(); - modalMain.addClass("slideUp"); - modalMain.removeClass("slideDown"); + reuseModal.show(); + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); - var uniqid = $(this).parents().attr('data-uniqid'); + var uniqid = $(this).parents().attr('data-uniqid'); - $('#ReuseCancelButton').on('click', function (event) { - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }); + $('#ReuseCancelButton').off('click').on('click', function (event) { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + }); - $('#ReuseButton').on('click', function (event) { - event.preventDefault(); + $('#ReuseButton').off('click').on('click', function (event) { // ここを修正 + event.preventDefault(); - var reusetext = $("#reusetexts").val(); + var reusetext = $("#reusetexts").val(); - if(reusetext == ""){ - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }else{ - $.ajax({ - url: '../function/reuse.php', - method: 'POST', - data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, - dataType: 'json', - success: function (response) { - if (response.success) { - reuseModal.hide(); - view_notify("引用リユーズしました"); - } else { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }, - error: function (xhr, status, error) { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }); - } - }); + if (reusetext == "") { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + } else { + $.ajax({ + url: '../function/reuse.php', + method: 'POST', + data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id }, + dataType: 'json', + success: function (response) { + reuseModal.hide(); + if (response.success) { + view_notify("引用リユーズしました"); + } else { + view_notify("引用リユーズに失敗しました"); + } + }, + error: function (xhr, status, error) { + reuseModal.hide(); + view_notify("引用リユーズに失敗しました"); + } + }); + } + }); }); $(document).on('click', '#normal_reuse_btn', function (event) { diff --git a/check.php b/check.php index 1165d20..9b3b6a0 100644 --- a/check.php +++ b/check.php @@ -42,7 +42,12 @@ try { ); $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); - $userid = $_SESSION['userid']; + if( !empty($_SESSION['userid']) ) { + $userid = $_SESSION['userid']; + }else{ + header("Location: login.php"); + exit; + } $userData = getUserData($pdo, $userid); $roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割 diff --git a/delete/delete.php b/delete/delete.php index b3a592f..4872ee9 100644 --- a/delete/delete.php +++ b/delete/delete.php @@ -2,11 +2,19 @@ require('../db.php'); require("../function/function.php"); blockedIP($_SERVER['REMOTE_ADDR']); +header('Content-Type: application/json'); -if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))){ +if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) { $postUserid = safetext($_POST['userid']); $postUniqid = safetext($_POST['uniqid']); $loginid = safetext($_POST['account_id']); + $loginkey = safetext($_COOKIE['loginkey']); + + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); + if ($is_login === false) { + echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } $result = delete_ueuse($postUniqid, $postUserid, $loginid); if($result[0] === true){ diff --git a/favorite/favorite.php b/favorite/favorite.php index 5a47bcd..a00085c 100644 --- a/favorite/favorite.php +++ b/favorite/favorite.php @@ -1,12 +1,20 @@ false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } try { $option = array( diff --git a/function/function.php b/function/function.php index 3be0bbc..64198ab 100644 --- a/function/function.php +++ b/function/function.php @@ -67,6 +67,7 @@ function blockedIP($ip_addr) { } } } +//通常のログイン処理 function uwuzuUserLogin($session, $cookie, $ip_addr, $operation_permission = "user") { //セッション,クッキー,IPアドレス,閲覧権限(userかadminかの二種類)を受け取る $serversettings_file = $_SERVER['DOCUMENT_ROOT']."/server/serversettings.ini"; @@ -218,6 +219,66 @@ function uwuzuUserLogin($session, $cookie, $ip_addr, $operation_permission = "us return false; } } +//APIなどのログイン処理(loginidとloginkeyが有効かを確かめる) +function uwuzuUserLoginCheck($loginid, $loginkey, $operation_permission = "user") { + //セッション,クッキー,IPアドレス,閲覧権限(userかadminかの二種類)を受け取る + $serversettings_file = $_SERVER['DOCUMENT_ROOT']."/server/serversettings.ini"; + $serversettings = parse_ini_file($serversettings_file, true); + // データベースに接続 + try { + $option = array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + } catch(PDOException $e) { + actionLog(null, "error", "uwuzuUserLogin", null, $e, 4); + return false; + } + + if(!(isset($loginid))){ + return false; + exit; + } + + if(!(isset($loginkey))){ + return false; + exit; + } + + $loginQuery = $pdo->prepare("SELECT * FROM account WHERE loginid = :loginid"); + $loginQuery->bindValue(':loginid', $loginid); + $loginQuery->execute(); + $loginResponse = $loginQuery->fetch(); + if(empty($loginResponse["userid"])){ + return false; + }elseif($loginid === $loginResponse["loginid"]){ + $userEncKey = GenUserEnckey($loginResponse["datetime"]); + $userLoginKey = hash_hmac('sha256', $loginResponse["loginid"], $userEncKey); + + if(!(empty($loginkey))){ + if(hash_equals($loginkey, $userLoginKey)){ + if($operation_permission == "admin"){ + if($loginResponse["admin"] == "yes"){ + $is_login = true; + }else{ + $is_login = false; + } + }else{ + $is_login = true; + } + }else{ + $is_login = false; + } + }else{ + $is_login = false; + } + + return $is_login; + }else{ + return false; + } +} //---------UNIQID-MAKER--------- function createUniqId(){ list($msec, $sec) = explode(" ", microtime()); @@ -1620,10 +1681,11 @@ function follow_user($pdo, $to_userid, $userid){ $pdo->beginTransaction(); try { // フォローボタンが押された場合の処理 - $followerList = explode(',', $userData['follower']); + $followerList = explode(',', $userData['follower'] ?? ''); if (!(in_array($userid, $followerList))) { // 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新 $followerList[] = $userid; + $followerList = array_values(array_unique(array_filter($followerList))); $newFollowerList = implode(',', $followerList); // UPDATE文を実行してフォロー情報を更新 @@ -1635,7 +1697,8 @@ function follow_user($pdo, $to_userid, $userid){ // 自分のfollowカラムを更新 $myflwlist = explode(',', $myData["follow"]); $myflwlist[] = $userData['userid']; - $newFollowList = implode(',', array_unique($myflwlist)); + $myflwlist = array_values(array_unique(array_filter($myflwlist))); + $newFollowList = implode(',', $myflwlist); $updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid"); $updateQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR); @@ -1649,16 +1712,16 @@ function follow_user($pdo, $to_userid, $userid){ return true; } else { $pdo->rollBack(); - actionLog($userid, "error", "unfollow_user", $to_userid, "フォロー解除に失敗", 3); + actionLog($userid, "error", "follow_user", $to_userid, "フォローに失敗", 3); return false; } }else{ - $pdo->rollBack(); + $pdo->commit(); return true; } } catch (Exception $e) { $pdo->rollBack(); - actionLog($userid, "error", "unfollow_user", $to_userid, $e, 4); + actionLog($userid, "error", "follow_user", $to_userid, $e, 4); return false; } }else{ @@ -1688,6 +1751,7 @@ function unfollow_user($pdo, $to_userid, $userid){ if (in_array($userid, $followerList)) { // 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新 $followerList = array_diff($followerList, array($userid)); + $followerList = array_values(array_unique(array_filter($followerList))); $newFollowerList = implode(',', $followerList); // UPDATE文を実行してフォロー情報を更新 @@ -1698,6 +1762,7 @@ function unfollow_user($pdo, $to_userid, $userid){ $myflwlist = explode(',', $myData["follow"]); $delfollowList = array_diff($myflwlist, array($userData['userid'])); + $delfollowList = array_values(array_unique(array_filter($delfollowList))); $deluserid = implode(',', $delfollowList); // 自分のfollowカラムから相手のユーザーIDを削除 @@ -1717,7 +1782,7 @@ function unfollow_user($pdo, $to_userid, $userid){ return false; } }else{ - $pdo->rollBack(); + $pdo->commit(); return true; } } catch (Exception $e) { diff --git a/function/reuse.php b/function/reuse.php index 075c64c..20cb3e5 100644 --- a/function/reuse.php +++ b/function/reuse.php @@ -4,7 +4,7 @@ header('Content-Type: application/json'); require('../db.php'); require("function.php"); blockedIP($_SERVER['REMOTE_ADDR']); -if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))) { +if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) { try { $option = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, @@ -21,6 +21,13 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) && $postUniqid = safetext($_POST['uniqid']); $reusetext = safetext($_POST['reusetext']); $loginid = safetext($_POST['account_id']); + $loginkey = safetext($_COOKIE['loginkey']); + + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); + if ($is_login === false) { + echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } $reusedate = date("Y-m-d H:i:s"); diff --git a/home/index.php b/home/index.php index 59142e8..66e9328 100644 --- a/home/index.php +++ b/home/index.php @@ -410,7 +410,10 @@ $(document).ready(function() { return null; } + var now_time = new Date().toUTCString(); + function loadPosts() { + now_time = new Date().toUTCString(); if (isLoading) return; isLoading = true; $("#loading").show(); @@ -715,59 +718,59 @@ $(document).ready(function() { }); - $(document).on('click', '#quote_reuse_btn', function (event) { - var modalMain = $('.modal-content'); - var reuseModal = $('#myQuoteReuseModal'); + $(document).on('click', '#quote_reuse_btn', function (event) { + var modalMain = $('.modal-content'); + var reuseModal = $('#myQuoteReuseModal'); - reuseModal.show(); - modalMain.addClass("slideUp"); - modalMain.removeClass("slideDown"); + reuseModal.show(); + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); - var uniqid = $(this).parents().attr('data-uniqid'); + var uniqid = $(this).parents().attr('data-uniqid'); - $('#ReuseCancelButton').on('click', function (event) { - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }); + $('#ReuseCancelButton').off('click').on('click', function (event) { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + }); - $('#ReuseButton').on('click', function (event) { - event.preventDefault(); + $('#ReuseButton').off('click').on('click', function (event) { // ここを修正 + event.preventDefault(); - var reusetext = $("#reusetexts").val(); + var reusetext = $("#reusetexts").val(); - if(reusetext == ""){ - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }else{ - $.ajax({ - url: '../function/reuse.php', - method: 'POST', - data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, - dataType: 'json', - success: function (response) { - if (response.success) { - reuseModal.hide(); - view_notify("引用リユーズしました"); - } else { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }, - error: function (xhr, status, error) { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }); - } - }); + if (reusetext == "") { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + } else { + $.ajax({ + url: '../function/reuse.php', + method: 'POST', + data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id }, + dataType: 'json', + success: function (response) { + reuseModal.hide(); + if (response.success) { + view_notify("引用リユーズしました"); + } else { + view_notify("引用リユーズに失敗しました"); + } + }, + error: function (xhr, status, error) { + reuseModal.hide(); + view_notify("引用リユーズに失敗しました"); + } + }); + } + }); }); + $(document).on('click', '#normal_reuse_btn', function (event) { event.preventDefault(); var uniqid = $(this).parents().attr('data-uniqid'); @@ -867,7 +870,6 @@ $(document).ready(function() { osho_gats.style.display = 'none'; }); - var now_time = new Date().toUTCString(); setInterval(() => { $.ajax({ url: '../nextpage/newueuse_chk.php', diff --git a/login.php b/login.php index 9d25d49..b57e280 100644 --- a/login.php +++ b/login.php @@ -66,6 +66,12 @@ if(!($is_login === false)){ } //------------------------------------------------------------- +//パスワード試行回数制限------------------------------------------- +if (!isset($_SESSION['login_passtry'])) { + $_SESSION['login_passtry'] = 0; +} +//------------------------------------------------------------- + if( !empty($_POST['btn_submit']) ) { $_SESSION['form_data'] = $_POST; @@ -157,6 +163,13 @@ if( !empty($_POST['btn_submit']) ) { } if(empty($error_message)){ + if ($_SESSION["login_passtry"] <= 5) { + $delay = $_SESSION["login_passtry"] * 2; + } else { + $delay = min(pow(2, $_SESSION["login_passtry"] - 2), 60); + } + sleep($delay); + if($result->rowCount() > 0) { $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する @@ -164,6 +177,7 @@ if( !empty($_POST['btn_submit']) ) { if(uwuzu_password_verify($password,$row["password"])){ if(empty($row["authcode"])){ $_SESSION['userid'] = $userid; + $_SESSION["login_passtry"] = 0; $_SESSION['form_data'] = array();//フォーム初期化 // リダイレクト先のURLへ転送する @@ -174,6 +188,7 @@ if( !empty($_POST['btn_submit']) ) { exit; }else{ $_SESSION['userid'] = $userid; + $_SESSION["login_passtry"] = 0; $_SESSION['form_data'] = array();//フォーム初期化 $url = 'authlogin.php'; @@ -182,15 +197,16 @@ if( !empty($_POST['btn_submit']) ) { // すべての出力を終了 exit; } - } - else{ + }else{ + $_SESSION["login_passtry"]++; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; } }else{ + $_SESSION["login_passtry"]++; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; } - } - else { + }else { + $_SESSION["login_passtry"]++; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; } } diff --git a/nextpage/bookmark.php b/nextpage/bookmark.php index 849c7e7..1b76c4b 100644 --- a/nextpage/bookmark.php +++ b/nextpage/bookmark.php @@ -139,7 +139,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ if(!($value["role"] === "ice")){ $value["bookmark"] = $mybookmark; diff --git a/nextpage/foryoupage.php b/nextpage/foryoupage.php index 3d8a420..366210b 100644 --- a/nextpage/foryoupage.php +++ b/nextpage/foryoupage.php @@ -256,7 +256,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ if(!($value["role"] === "ice")){ $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 diff --git a/nextpage/ftlpage.php b/nextpage/ftlpage.php index ebeb49e..7f6eb88 100644 --- a/nextpage/ftlpage.php +++ b/nextpage/ftlpage.php @@ -138,7 +138,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ if(!($value["role"] === "ice")){ $value["bookmark"] = $mybookmark; diff --git a/nextpage/nextpage.php b/nextpage/nextpage.php index 12d890c..5c43855 100644 --- a/nextpage/nextpage.php +++ b/nextpage/nextpage.php @@ -122,7 +122,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ if(!($value["role"] === "ice")){ $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 diff --git a/nextpage/ueusepage.php b/nextpage/ueusepage.php index 0e16174..3f9ba55 100644 --- a/nextpage/ueusepage.php +++ b/nextpage/ueusepage.php @@ -137,7 +137,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ $value["bookmark"] = $mybookmark; $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 diff --git a/nextpage/userlikepage.php b/nextpage/userlikepage.php index 683767b..c5c29d3 100644 --- a/nextpage/userlikepage.php +++ b/nextpage/userlikepage.php @@ -56,19 +56,27 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { $userQuery->execute(); $userData = $userQuery->fetch(); - $sql = "SELECT ueuse.* - FROM ueuse - LEFT JOIN account ON ueuse.account = account.userid - WHERE ueuse.favorite LIKE :userid AND account.role != 'ice' - ORDER BY ueuse.datetime DESC - LIMIT :offset, :itemsPerPage"; + $itemsPerPage = 15; // 取得件数の基準 + $offset = ($pageNumber - 1) * $itemsPerPage; + $message_array = []; - $stmt = $pdo->prepare($sql); - $stmt->bindValue(':userid', '%,' . $uwuzuid . '%', PDO::PARAM_STR); - $stmt->bindValue(':offset', $offset, PDO::PARAM_INT); - $stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); - $stmt->execute(); - $message_array = $stmt->fetchAll(); + $sql = "SELECT ueuse.* + FROM ueuse + LEFT JOIN account ON ueuse.account = account.userid + WHERE FIND_IN_SET(:userid, REPLACE(ueuse.favorite, ' ', '')) > 0 + AND account.role != 'ice' + ORDER BY ueuse.datetime DESC + LIMIT :offset, :itemsPerPage"; + + $stmt = $pdo->prepare($sql); + $stmt->bindValue(':userid', $uwuzuid, PDO::PARAM_STR); + $stmt->bindValue(':offset', $offset, PDO::PARAM_INT); + $stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); + $stmt->execute(); + $results = $stmt->fetchAll(); + + // 結果を追加 + $message_array = array_merge($message_array, $results); $messages = array(); foreach ($message_array as $row) { @@ -129,7 +137,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ $value["bookmark"] = $mybookmark; $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 diff --git a/nextpage/usermediapage.php b/nextpage/usermediapage.php index 7969ee2..9484fac 100644 --- a/nextpage/usermediapage.php +++ b/nextpage/usermediapage.php @@ -129,7 +129,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ $value["bookmark"] = $mybookmark; $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 diff --git a/nextpage/userpage.php b/nextpage/userpage.php index 23bddea..dec924e 100644 --- a/nextpage/userpage.php +++ b/nextpage/userpage.php @@ -122,7 +122,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) { if(!empty($messages)){ foreach ($messages as $value) { - if (false === strpos($myblocklist, ','.safetext($value['account']))) { + if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ $value["bookmark"] = $mybookmark; $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 diff --git a/search/index.php b/search/index.php index 2a4f46c..ca1d3b1 100644 --- a/search/index.php +++ b/search/index.php @@ -485,57 +485,56 @@ $(document).ready(function() { }); }); - $(document).on('click', '#quote_reuse_btn', function (event) { - var modalMain = $('.modal-content'); - var reuseModal = $('#myQuoteReuseModal'); + $(document).on('click', '#quote_reuse_btn', function (event) { + var modalMain = $('.modal-content'); + var reuseModal = $('#myQuoteReuseModal'); - reuseModal.show(); - modalMain.addClass("slideUp"); - modalMain.removeClass("slideDown"); + reuseModal.show(); + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); - var uniqid = $(this).parents().attr('data-uniqid'); + var uniqid = $(this).parents().attr('data-uniqid'); - $('#ReuseCancelButton').on('click', function (event) { - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }); + $('#ReuseCancelButton').off('click').on('click', function (event) { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + }); - $('#ReuseButton').on('click', function (event) { - event.preventDefault(); + $('#ReuseButton').off('click').on('click', function (event) { // ここを修正 + event.preventDefault(); - var reusetext = $("#reusetexts").val(); + var reusetext = $("#reusetexts").val(); - if(reusetext == ""){ - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }else{ - $.ajax({ - url: '../function/reuse.php', - method: 'POST', - data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, - dataType: 'json', - success: function (response) { - if (response.success) { - reuseModal.hide(); - view_notify("引用リユーズしました"); - } else { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }, - error: function (xhr, status, error) { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }); - } - }); + if (reusetext == "") { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + } else { + $.ajax({ + url: '../function/reuse.php', + method: 'POST', + data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id }, + dataType: 'json', + success: function (response) { + reuseModal.hide(); + if (response.success) { + view_notify("引用リユーズしました"); + } else { + view_notify("引用リユーズに失敗しました"); + } + }, + error: function (xhr, status, error) { + reuseModal.hide(); + view_notify("引用リユーズに失敗しました"); + } + }); + } + }); }); $(document).on('click', '#normal_reuse_btn', function (event) { diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt index abb529d..87891fa 100644 --- a/server/uwuzuinfo.txt +++ b/server/uwuzuinfo.txt @@ -1,4 +1,4 @@ uwuzu -1.4.14 -2025/01/26 +1.4.15 +2025/03/15 daichimarukana,putonfps \ No newline at end of file diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt index f083c0d..f744e7f 100644 --- a/server/uwuzurelease.txt +++ b/server/uwuzurelease.txt @@ -1,6 +1,18 @@ ## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) +## Version 1.4.15 (Funium) +2025/03/15 +fix: フォロー・フォロー解除の安定化を行いました。 +fix: ブロックしていないユーザーがブロックされていると判定されてしまう問題を修正しました! +fix: 引用リユーズが勝手に複数回行われてしまう問題を修正しました! +fix: 最新のユーズが読み込まれているのにもかかわらず、"🍊新しいユーズがあります!"が表示されてしまう問題を修正しました! +fix: ログインに関するバグを修正しました! +fix: ユーザーページにていいね欄に他のユーザーのいいねしたユーズが表示されてしまう問題を修正しました +fix: 管理者がユーザーに個別で通知を送信する機能で本文の最大文字数が128文字に制限されてしまう問題を修正しました! +new: 総当たり攻撃を防ぐためログイン時に失敗回数に応じて遅延させる機能を追加しました! +new: 内部APIのセキュリティ認証を強化しました! + ## Version 1.4.14 (Funium) 2025/01/26 fix: その他ページでのバグを修正しました。 diff --git a/settings_admin/api/code_delete.php b/settings_admin/api/code_delete.php index 5b144b7..0842f71 100644 --- a/settings_admin/api/code_delete.php +++ b/settings_admin/api/code_delete.php @@ -6,10 +6,17 @@ blockedIP($_SERVER['REMOTE_ADDR']); header("Content-Type: application/json; charset=utf-8"); header("Access-Control-Allow-Origin: *"); -if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))){ +if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) { $postUserid = safetext($_POST['userid']); $postCode= safetext($_POST['code']); $loginid = safetext($_POST['account_id']); + $loginkey = safetext($_COOKIE['loginkey']); + + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "admin"); + if ($is_login === false) { + echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } try { $option = array( diff --git a/settings_admin/api/update_query.php b/settings_admin/api/update_query.php index 104e0d2..5e32f94 100644 --- a/settings_admin/api/update_query.php +++ b/settings_admin/api/update_query.php @@ -6,10 +6,17 @@ blockedIP($_SERVER['REMOTE_ADDR']); header("Content-Type: application/json; charset=utf-8"); header("Access-Control-Allow-Origin: *"); -if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['account_id'])){ +if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['account_id']) && isset($_COOKIE['loginkey'])) { $postUserid = safetext($_POST['userid']); $postZip= $_FILES['update_zip']; $loginid = safetext($_POST['account_id']); + $loginkey = safetext($_COOKIE['loginkey']); + + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "admin"); + if ($is_login === false) { + echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } try { $option = array( diff --git a/settings_admin/userinfo.php b/settings_admin/userinfo.php index 5376616..6046d13 100644 --- a/settings_admin/userinfo.php +++ b/settings_admin/userinfo.php @@ -130,7 +130,7 @@ if( !empty($_POST['send_notification_submit']) ) { } if(empty($notice_msg)){ $error_message[] = "通知の本文を空欄にすることはできません。(INPUT_PLEASE)"; - }elseif(mb_strlen($notice_msg) > 128){ + }elseif(mb_strlen($notice_msg) > 16777216){ $error_message[] = "通知の本文を16777216文字以上にすることはできません。(INPUT_OVER_MAX_COUNT)"; } if(empty($error_message)){ @@ -710,7 +710,7 @@ $(document).ready(function() { }, 150); }); - cancelButton3.addEventListener('click', () => { // 追加 + cancelButton4.addEventListener('click', () => { // 追加 modalMain.removeClass("slideUp"); modalMain.addClass("slideDown"); window.setTimeout(function(){ diff --git a/ueuse/index.php b/ueuse/index.php index 358db61..472a172 100644 --- a/ueuse/index.php +++ b/ueuse/index.php @@ -596,57 +596,56 @@ $(document).ready(function() { }); //-----------------リユーズ----------------- - $(document).on('click', '#quote_reuse_btn', function (event) { - var modalMain = $('.modal-content'); - var reuseModal = $('#myQuoteReuseModal'); + $(document).on('click', '#quote_reuse_btn', function (event) { + var modalMain = $('.modal-content'); + var reuseModal = $('#myQuoteReuseModal'); - reuseModal.show(); - modalMain.addClass("slideUp"); - modalMain.removeClass("slideDown"); + reuseModal.show(); + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); - var uniqid = $(this).parents().attr('data-uniqid'); + var uniqid = $(this).parents().attr('data-uniqid'); - $('#ReuseCancelButton').on('click', function (event) { - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }); + $('#ReuseCancelButton').off('click').on('click', function (event) { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + }); - $('#ReuseButton').on('click', function (event) { - event.preventDefault(); + $('#ReuseButton').off('click').on('click', function (event) { // ここを修正 + event.preventDefault(); - var reusetext = $("#reusetexts").val(); + var reusetext = $("#reusetexts").val(); - if(reusetext == ""){ - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }else{ - $.ajax({ - url: '../function/reuse.php', - method: 'POST', - data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, - dataType: 'json', - success: function (response) { - if (response.success) { - reuseModal.hide(); - view_notify("引用リユーズしました"); - } else { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }, - error: function (xhr, status, error) { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }); - } - }); + if (reusetext == "") { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + } else { + $.ajax({ + url: '../function/reuse.php', + method: 'POST', + data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id }, + dataType: 'json', + success: function (response) { + reuseModal.hide(); + if (response.success) { + view_notify("引用リユーズしました"); + } else { + view_notify("引用リユーズに失敗しました"); + } + }, + error: function (xhr, status, error) { + reuseModal.hide(); + view_notify("引用リユーズに失敗しました"); + } + }); + } + }); }); $(document).on('click', '#normal_reuse_btn', function (event) { diff --git a/update.json b/update.json index b1608d1..cbdf119 100644 --- a/update.json +++ b/update.json @@ -1,27 +1,40 @@ { "software": "uwuzu", - "version": "1.4.14", - "release_date": "2025/01/26", - "release_notes": "このアップデートではいくつかのバグ修正と個別でユーザーに通知を送信する新機能が含まれます。", - "notices": "アップデートの前にベースの構造の更新をしてください!加えて、データのバックアップを行うことをおすすめします!", + "version": "1.4.15", + "release_date": "2025/03/15", + "release_notes": "このアップデートではいくつかのバグ修正セキュリティの更新が含まれます。", + "notices": "アップデート前にデータのバックアップを行うことをおすすめします!", "files": { "overwrite": [ - "/api/ueuse/create.php", + "/abi/addabi.php", "/bookmark/bookmark.php", "/bookmark/index.php", "/delete/delete.php", + "/favorite/favorite.php", "/function/function.php", + "/function/reuse.php", "/home/index.php", - "/js/nsfw_event.js", - "/js/unsupported.js", "/nextpage/bookmark.php", "/nextpage/foryoupage.php", - "/others/index.php", - "/settings_admin/actionlog_admin.php", - "/settings_admin/ipblock_admin.php", + "/nextpage/ftlpage.php", + "/nextpage/nextpage.php", + "/nextpage/ueusepage.php", + "/nextpage/userlikepage.php", + "/nextpage/usermediapage.php", + "/nextpage/userpage.php", + "/search/index.php", "/settings_admin/userinfo.php", + "/settings_admin/api/code_delete.php", + "/settings_admin/api/update_query.php", "/ueuse/index.php", "/user/index.php", + "/addauthcode.php", + "/authcodechk.php", + "/authlogin.php", + "/check.php", + "/login.php", + "/new.php", + "/uwuzu_error_code.txt", "/server/uwuzuabout.txt", "/server/uwuzuinfo.txt", "/server/uwuzurelease.txt" diff --git a/user/index.php b/user/index.php index 0be23b2..1c39b9d 100644 --- a/user/index.php +++ b/user/index.php @@ -110,8 +110,8 @@ if (!empty($pdo)) { $follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数 // コンマで区切って配列に分割し、要素数を数える - $followIds = array_reverse(explode(',', $follow)); - $followCount = count($followIds) - 1; + $followIds = array_reverse(array_values(array_filter(explode(',', $follow)))); + $followCount = count($followIds); $follow_on_me = array_search($userid, $followIds); @@ -125,8 +125,8 @@ if (!empty($pdo)) { $follower = $userdata['follower']; // コンマで区切られたユーザーIDを含む変数 // コンマで区切って配列に分割し、要素数を数える - $followerIds = array_reverse(explode(',', $follower)); - $followerCount = count($followerIds) - 1; + $followerIds = array_reverse(array_values(array_filter(explode(',', $follower)))); + $followerCount = count($followerIds); $profileText = safetext($userData['profile']); @@ -138,49 +138,54 @@ if (!empty($pdo)) { //-------フォロワー取得--------- - // フォロワーのユーザーIDを $follower_userids 配列に追加 - foreach ($followerIds as $follower_userid) { - $follower_userids[] = $follower_userid; - } - - // フォロワーのユーザー情報を取得 $follower_userdata = array(); + if(!(empty($followerIds))){ + // フォロワーのユーザーIDを $follower_userids 配列に追加 + foreach ($followerIds as $follower_userid) { + $follower_userids[] = $follower_userid; + } - foreach ($follower_userids as $follower_userid) { - $follower_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); - $follower_userQuery->bindValue(':userid', $follower_userid); - $follower_userQuery->execute(); - $follower_userinfo = $follower_userQuery->fetch(); + // フォロワーのユーザー情報を取得 - if ($follower_userinfo) { - // フォロワーのユーザー情報を $follower_userdata 配列に追加 - $follower_userdata[] = $follower_userinfo; + foreach ($follower_userids as $follower_userid) { + $follower_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); + $follower_userQuery->bindValue(':userid', $follower_userid); + $follower_userQuery->execute(); + $follower_userinfo = $follower_userQuery->fetch(); + + if ($follower_userinfo) { + // フォロワーのユーザー情報を $follower_userdata 配列に追加 + $follower_userdata[] = $follower_userinfo; + } } } //-------フォロー取得--------- - foreach ($followIds as $follow_userid) { - $follow_userids[] = $follow_userid; - } - $follow_userdata = array(); - foreach ($follow_userids as $follow_userid) { - $follow_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); - $follow_userQuery->bindValue(':userid', $follow_userid); - $follow_userQuery->execute(); - $follow_userinfo = $follow_userQuery->fetch(); + if(!(empty($followIds))){ + foreach ($followIds as $follow_userid) { + $follow_userids[] = $follow_userid; + } - if ($follow_userinfo) { - // フォロワーのユーザー情報を $follower_userdata 配列に追加 - $follow_userdata[] = $follow_userinfo; + foreach ($follow_userids as $follow_userid) { + $follow_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); + $follow_userQuery->bindValue(':userid', $follow_userid); + $follow_userQuery->execute(); + $follow_userinfo = $follow_userQuery->fetch(); + + if ($follow_userinfo) { + // フォロワーのユーザー情報を $follower_userdata 配列に追加 + $follow_userdata[] = $follow_userinfo; + } } } } else { $userData["userid"] = "none"; $userData['username'] = "でふぉると"; + $isAIBlock = false; $ueuse_cnt = "zero"; $followCount = "zero"; $followerCount = "zero"; @@ -370,7 +375,7 @@ $pdo = null;
-

からuwuzuを利用しています。

+

からuwuzuを利用しています。

@@ -432,7 +437,7 @@ $pdo = null;
-

からuwuzuを利用しています。

+

からuwuzuを利用しています。

@@ -1037,57 +1042,56 @@ $pdo = null; //---------------リユーズ---------------- - $(document).on('click', '#quote_reuse_btn', function (event) { - var modalMain = $('.modal-content'); - var reuseModal = $('#myQuoteReuseModal'); + $(document).on('click', '#quote_reuse_btn', function (event) { + var modalMain = $('.modal-content'); + var reuseModal = $('#myQuoteReuseModal'); - reuseModal.show(); - modalMain.addClass("slideUp"); - modalMain.removeClass("slideDown"); + reuseModal.show(); + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); - var uniqid = $(this).parents().attr('data-uniqid'); + var uniqid = $(this).parents().attr('data-uniqid'); - $('#ReuseCancelButton').on('click', function (event) { - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }); + $('#ReuseCancelButton').off('click').on('click', function (event) { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + }); - $('#ReuseButton').on('click', function (event) { - event.preventDefault(); + $('#ReuseButton').off('click').on('click', function (event) { // ここを修正 + event.preventDefault(); - var reusetext = $("#reusetexts").val(); + var reusetext = $("#reusetexts").val(); - if(reusetext == ""){ - modalMain.removeClass("slideUp"); - modalMain.addClass("slideDown"); - window.setTimeout(function(){ - reuseModal.hide(); - }, 150); - }else{ - $.ajax({ - url: '../function/reuse.php', - method: 'POST', - data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, - dataType: 'json', - success: function (response) { - if (response.success) { - reuseModal.hide(); - view_notify("引用リユーズしました"); - } else { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }, - error: function (xhr, status, error) { - reuseModal.hide(); - view_notify("引用リユーズに失敗しました"); - } - }); - } - }); + if (reusetext == "") { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + reuseModal.hide(); + }, 150); + } else { + $.ajax({ + url: '../function/reuse.php', + method: 'POST', + data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id }, + dataType: 'json', + success: function (response) { + reuseModal.hide(); + if (response.success) { + view_notify("引用リユーズしました"); + } else { + view_notify("引用リユーズに失敗しました"); + } + }, + error: function (xhr, status, error) { + reuseModal.hide(); + view_notify("引用リユーズに失敗しました"); + } + }); + } + }); }); $(document).on('click', '#normal_reuse_btn', function (event) { diff --git a/uwuzu_error_code.txt b/uwuzu_error_code.txt index c5fc07e..e05ddce 100644 --- a/uwuzu_error_code.txt +++ b/uwuzu_error_code.txt @@ -28,6 +28,7 @@ migration_bad_success - アカウントの移行後に移行の完了処理が already_been_completed - 処理が既に完了している場合に表示されます。 you_cant_it_to_yourself - 自分に対して行えない処理を行おうとした際に表示されます。 could_not_complete - 処理を完了できなかった場合に表示されます。 +this_API_is_ws_only - WebsocketAPIがWebsocket以外の方法でアクセスされた場合に表示されます。 ----------(UWUZU ERR CODE)---------- FILE_DEKASUGUI_PHP_INI_KAKUNIN - php.iniで設定されているファイルサイズ上限を上回っている時に表示されます。 @@ -144,6 +145,7 @@ DELETE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内で UPDATE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内にあるはずの更新用のファイルが存在しなかった際に表示されます。 BAD_REQUEST - 不正なリクエストが送信されてきた際に表示されます。 +AUTH_INVALID - アカウントの認証に失敗した際に表示されます。 DON'T_TOUCH_SYSTEM_ROLE - システムロールをべたべた触ったり削除しようとしたりすると表示されます。