diff --git a/admin/addadmin.php b/admin/addadmin.php index 38f1ffa..0261b9b 100644 --- a/admin/addadmin.php +++ b/admin/addadmin.php @@ -84,8 +84,10 @@ if( !empty($_POST['btn_submit']) ) { $chkpass = safetext($_POST['chkpass']); $mailadds = safetext($_POST['mailadds']); - if(!(filter_var($mailadds, FILTER_VALIDATE_EMAIL))){ - $error_message[] = 'メールアドレスが正しい形式ではありません。(MAILADDS_CHECK_DAME)'; + if(!(empty($mailadds))){ + if(!(filter_var($mailadds, FILTER_VALIDATE_EMAIL))){ + $error_message[] = 'メールアドレスが正しい形式ではありません。(MAILADDS_CHECK_DAME)'; + } } $profile = safetext($_POST['profile']); @@ -461,7 +463,7 @@ $pdo = null;

パスワード *

-
ログイン時に必要となります。
※サービス管理者が確認できません。
+
ログイン時に必要となります。
最大256文字まで使用可能です。
※サービス管理者が確認できません。
diff --git a/admin/index.php b/admin/index.php index 6bf2fa2..e253236 100644 --- a/admin/index.php +++ b/admin/index.php @@ -104,6 +104,11 @@ if (in_array("mysqli", get_loaded_extensions())) { } else { $check_mysqli = false; } +if (in_array("zip", get_loaded_extensions())) { + $check_zip = true; +} else { + $check_zip = false; +} // データベースの接続を閉じる $pdo = null; @@ -171,6 +176,7 @@ $pdo = null;

mbstring :

pdo_mysql :

mysqli :

+

ZipArchive :

diff --git a/function/function.php b/function/function.php index 533ec15..4cdcb1f 100644 --- a/function/function.php +++ b/function/function.php @@ -343,7 +343,7 @@ function replaceURLsWithLinks($postText, $maxLength = 48) { $convertedText = preg_replace_callback($pattern, function($matches) use ($maxLength) { $link = $matches[0]; if(!(preg_match('/:(\w+):/',$link))){ - $no_https_link = str_replace("https://", "", $link); + $no_https_link = preg_replace('/https:\/\//', '', $link, 1); if (mb_strlen($link) > $maxLength) { $truncatedLink = mb_substr($no_https_link, 0, $maxLength).'...'; return ''.$truncatedLink.''; @@ -620,63 +620,68 @@ function send_notification($to,$from,$title,$message,$url,$category){ return false; } - $query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); - $query->execute(array(':userid' => $from)); - $result = $query->fetch(); + if(!($to == $from)){ + $query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); + $query->execute(array(':userid' => $from)); + $result = $query->fetch(); - $category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other"]; - if(in_array($category, $category_list)){ - if(in_array($category, explode(',', $result["notification_settings"])) || empty($result["notification_settings"]) || $category === "system" || $category === "other"){ - if(!(empty($pdo))){ - $pdo->beginTransaction(); + $category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other"]; + if(in_array($category, $category_list)){ + if(in_array($category, explode(',', $result["notification_settings"])) || empty($result["notification_settings"]) || $category === "system" || $category === "other"){ + if(!(empty($pdo))){ + $pdo->beginTransaction(); - try { - $fromuserid = safetext($from); - $touserid = safetext($to); - $datetime = date("Y-m-d H:i:s"); - $msg = safetext($message); - $title = safetext($title); - $url = safetext($url); - $userchk = 'none'; - $notification_category = safetext($category); - - // 通知用SQL作成 - $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category)"); - - $stmt->bindParam(':fromuserid', $fromuserid, PDO::PARAM_STR); - $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(':category', $notification_category, PDO::PARAM_STR); - - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); - - $res = $stmt->execute(); - - $res = $pdo->commit(); - - if($res){ - return true; - }else{ + try { + $fromuserid = safetext($from); + $touserid = safetext($to); + $datetime = date("Y-m-d H:i:s"); + $msg = safetext($message); + $title = safetext($title); + $url = safetext($url); + $userchk = 'none'; + $notification_category = safetext($category); + + // 通知用SQL作成 + $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category)"); + + $stmt->bindParam(':fromuserid', $fromuserid, PDO::PARAM_STR); + $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(':category', $notification_category, PDO::PARAM_STR); + + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $res = $stmt->execute(); + + $res = $pdo->commit(); + + if($res){ + return true; + }else{ + $pdo->rollBack(); + return false; + } + + } catch(Exception $e) { $pdo->rollBack(); return false; } - - } catch(Exception $e) { - $pdo->rollBack(); + }else{ return false; } }else{ - return false; + // 受信しない設定なのでtrue + return true; } }else{ - // 受信しない設定なのでtrue - return true; + return false; } }else{ - return false; + // 送信元と送信先が同じなら送信しない + return true; } } // ユーズするとき全部この関数 @@ -1290,5 +1295,4 @@ function EncryptionUseEncrKey($data,$key,$iv){ function DecryptionUseEncrKey($data,$key,$iv){ return openssl_decrypt($data, "aes-256-cbc", $key, 0, $iv); } - ?> \ No newline at end of file diff --git a/login.php b/login.php index beba69a..cee6967 100644 --- a/login.php +++ b/login.php @@ -308,7 +308,7 @@ $pdo = null;

パスワード

- +
diff --git a/new.php b/new.php index ac4342f..2a41a20 100644 --- a/new.php +++ b/new.php @@ -576,7 +576,7 @@ $pdo = null;

パスワード *

-
ログイン時に必要となります。
※サービス管理者が確認できません。
+
ログイン時に必要となります。
最大256文字まで使用可能です。
※サービス管理者が確認できません。
diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt index 239e139..9f7a62c 100644 --- a/server/uwuzuinfo.txt +++ b/server/uwuzuinfo.txt @@ -1,4 +1,4 @@ uwuzu -1.4.4 -2024/08/30 +1.4.5 +2024/10/13 daichimarukana,putonfps \ No newline at end of file diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt index c5a70b5..870e9f4 100644 --- a/server/uwuzurelease.txt +++ b/server/uwuzurelease.txt @@ -1,6 +1,14 @@ ## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) +## Version 1.4.5 (Funium) +リリース日:2024/10/13 +fix: URLに関する処理の問題を修正しました +fix: ログイン時にパスワードが32文字以上入力できない問題を修正しました +fix: 管理者アカウント登録時にメールアドレスが必要になってしまう問題を修正しました +chg: 自分へのアクションには通知を送信しないようにしました! +chg: 広告の配信時に時間まで指定できるようにしました! + ## Version 1.4.4 (Funium) リリース日:2024/08/30 fix: OpenSearchのxmlが正しく生成されない問題を修正しました diff --git a/settings_admin/ad_admin.php b/settings_admin/ad_admin.php index 07dab37..9c142dd 100644 --- a/settings_admin/ad_admin.php +++ b/settings_admin/ad_admin.php @@ -188,8 +188,9 @@ if( !empty($_POST['ads_btn_submit']) ) { $ads_url = safetext($_POST['ads_url']); $ads_img_url = safetext($_POST['ads_img_url']); - $ads_start_date = safetext(date($_POST['ads_start_date'])); - $ads_limit_date = safetext(date($_POST['ads_limit_date'])); + $ads_start_date = date('Y/m/d H:i:s', strtotime(safetext(date($_POST['ads_start_date'])))); + $ads_limit_date = date('Y/m/d H:i:s', strtotime(safetext(date($_POST['ads_limit_date'])))); + $ads_memo = safetext($_POST['ads_memo']); if(empty($ads_url)){ @@ -342,12 +343,12 @@ if (!empty($pdo)) {

掲載開始日時

広告の掲載開始日時です。
- +

掲載終了日時

広告の掲載終了日時です。
- +

広告のメモ

@@ -372,7 +373,7 @@ if (!empty($pdo)) { }else{ echo "設置解除済⛔"; }}?>

-

設置期間: +

設置期間:


URL:

画像URL:

diff --git a/update.json b/update.json index 1426e29..b8cadaa 100644 --- a/update.json +++ b/update.json @@ -1,31 +1,21 @@ { "software": "uwuzu", - "version": "1.4.4", - "release_date": "2024-08-30", - "release_notes": "このアップデートでは、動画をアップロードできない問題など様々な問題を修正しました!\nまた、安全性の向上や、絵文字の管理機能の強化などが含まれます。\n新しいバージョンのuwuzuをお楽しみください!", + "version": "1.4.5", + "release_date": "2024-10-13", + "release_notes": "このアップデートではログイン時にパスワードが32文字以上入力できない問題や、他数件の問題が修正されています。", "notices": "アップデートの前に、データのバックアップを行うことをおすすめします!", "files": { "overwrite": [ - "/abi/addabi.php", "/admin/addadmin.php", - "/api/migration-api.php", - "/css/style.css", - "/css/home.css", + "/api/ueuse/get.php", + "/bookmark/index.php", + "/emoji/index.php", "/function/function.php", - "/migration/index.php", - "/nextpage/view.php", - "/others/index.php", - "/search/opensearch.php", - "/settings/index.php", - "/settings_admin/plugin_settings/phpmailer_sender.php", - "/settings_admin/plugin_admin.php", + "/home/index.php", + "/user/outbox/index.php", "/settings_admin/ad_admin.php", - "/settings_admin/addemoji_admin.php", - "/settings_admin/overview_admin.php", - "/authlogin.php", "/login.php", "/new.php", - "/uwuzu_error_code.txt", "/server/uwuzuabout.txt", "/server/uwuzuinfo.txt", "/server/uwuzurelease.txt" diff --git a/user/outbox/index.php b/user/outbox/index.php index 06ad3d6..e40cba5 100644 --- a/user/outbox/index.php +++ b/user/outbox/index.php @@ -1,5 +1,5 @@