diff --git a/addauthcode.php b/addauthcode.php index df9f9c6..39cbf43 100644 --- a/addauthcode.php +++ b/addauthcode.php @@ -249,15 +249,14 @@ $pdo = null; diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt index 073b5f0..0445429 100644 --- a/server/uwuzuinfo.txt +++ b/server/uwuzuinfo.txt @@ -1,4 +1,4 @@ uwuzu -1.3.0 -2024/02/24 +1.3.1 +2024/03/02 daichimarukana,putonfps \ No newline at end of file diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt index babf793..33104dd 100644 --- a/server/uwuzurelease.txt +++ b/server/uwuzurelease.txt @@ -1,6 +1,14 @@ ## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) +## Version 1.3.1 (new_Planet) +リリース日:2024/03/02 +fix: 絵文字が正常に表示されなくなる問題を修正しました。 +fix: ダークモード使用時に通知のMarkdownで文字の色が変わらない問題を修正しました。 +fix: ユーザーIDに半角英数字以外の文字列が使用できる問題を修正しました。 +fix: 一部UIを変更しました +fix: その他微調整を行いました。 + ## Version 1.3.0 (new_Planet) リリース日:2024/02/24 fix: サーバーロゴ未設定の状態でuwuzuロゴが表示されない問題を修正しました。 diff --git a/settings/index.php b/settings/index.php index 85a58d6..dee8d2d 100644 --- a/settings/index.php +++ b/settings/index.php @@ -338,8 +338,12 @@ if( !empty($_POST['pass_submit']) ) { if(empty($pass_chk)){ $error_message[] = 'ユーザーidを入力してください。(USERID_INPUT_PLEASE)'; }else{ - if(!($pass_chk === $userData["userid"])){ - $error_message[] = 'ユーザーidが不正です。(USERID_CHIGAUYANKE)'; + if(!(preg_match("/^[a-zA-Z0-9_]+$/", $pass_chk))){ + $error_message[] = "IDは半角英数字で作成してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)"; + }else{ + if(!($pass_chk === $userData["userid"])){ + $error_message[] = 'ユーザーidが不正です。(USERID_CHIGAUYANKE)'; + } } } diff --git a/ueuse/index.php b/ueuse/index.php index 87fc499..c30b0f1 100644 --- a/ueuse/index.php +++ b/ueuse/index.php @@ -522,20 +522,22 @@ if( !empty($_POST['btn_submit']) ) { $pdo->beginTransaction(); + $fromuserid = $userid; $msg = ''.$ueuse.''; $title = ''.$userid.'さんが返信しました!'; $url = $_SERVER['REQUEST_URI']; $userchk = 'none'; // 通知用SQL作成 - $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); + $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); - $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':fromuserid', htmlentities($fromuserid), PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); + $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res = $stmt->execute(); @@ -552,6 +554,7 @@ if( !empty($_POST['btn_submit']) ) { $pdo->beginTransaction(); try { + $fromuserid = $userid; $touserid = $mentionedUser; $datetime = date("Y-m-d H:i:s"); $msg = "" . $ueuse . ""; @@ -560,9 +563,9 @@ if( !empty($_POST['btn_submit']) ) { $userchk = 'none'; // 通知用SQL作成 - $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - + $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title)"); + $stmt->bindParam(':fromuserid', htmlentities($fromuserid), PDO::PARAM_STR); $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); diff --git a/uwuzu_error_code.txt b/uwuzu_error_code.txt index a4b2da0..d101782 100644 --- a/uwuzu_error_code.txt +++ b/uwuzu_error_code.txt @@ -45,6 +45,7 @@ USERID_SHIYOUZUMI - ユーザーIDがすでに使用されている時に表示 USERID_CHECK_INPUT_PLEASE - ユーザーID確認用IDが入力されていない場合に表示されます。 USERID_CHIGAUYANKE - ユーザーID確認用IDがアカウント作成時のものと違う場合に表示されます。 USERID_CONTAINS_PROHIBITED - 登録禁止ユーザーIDが入力された場合に表示されます。 +USERID_DONT_USE_WORD - 使用禁止文字が入力されている際に表示されます。 PASSWORD_INPUT_PLEASE - パスワードが入力されていない時に表示されます。 PASSWORD_NEW_INPUT_PLEASE - 新しいパスワードが入力されていない場合に表示されます。