mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.6.6 Hapuego
This commit is contained in:
+73
-37
@@ -2374,12 +2374,31 @@ function getFolloweeList($pdo, $userid){
|
|||||||
$all_followee = $query->fetchAll(PDO::FETCH_COLUMN);
|
$all_followee = $query->fetchAll(PDO::FETCH_COLUMN);
|
||||||
|
|
||||||
if($all_followee){
|
if($all_followee){
|
||||||
return $all_followee;
|
$valid_followees = [];
|
||||||
|
foreach ($all_followee as $followee_id){
|
||||||
|
$userData = getUserData($pdo, $followee_id);
|
||||||
|
if($userData){
|
||||||
|
$valid_followees[] = $followee_id;
|
||||||
|
} else {
|
||||||
|
unfollow_user($pdo, $followee_id, $userid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $valid_followees;
|
||||||
}else{
|
}else{
|
||||||
$userdata = getUserData($pdo, $userid);
|
$userdata = getUserData($pdo, $userid);
|
||||||
$followeeIds = array_filter(explode(',', $userdata['follow']));
|
$followeeIds = array_filter(explode(',', $userdata['follow']));
|
||||||
if($followeeIds){
|
if($followeeIds){
|
||||||
return $followeeIds;
|
$valid_followees = [];
|
||||||
|
foreach ($followeeIds as $followee_id){
|
||||||
|
$userData = getUserData($pdo, $followee_id);
|
||||||
|
|
||||||
|
if($userData){
|
||||||
|
$valid_followees[] = $followee_id;
|
||||||
|
} else {
|
||||||
|
unfollow_user($pdo, $followee_id, $userid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $valid_followees;
|
||||||
}else{
|
}else{
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@@ -2396,12 +2415,32 @@ function getFollowerList($pdo, $userid){
|
|||||||
$all_follower = $query->fetchAll(PDO::FETCH_COLUMN);
|
$all_follower = $query->fetchAll(PDO::FETCH_COLUMN);
|
||||||
|
|
||||||
if($all_follower){
|
if($all_follower){
|
||||||
return $all_follower;
|
$valid_followers = [];
|
||||||
|
foreach ($all_follower as $follower_id){
|
||||||
|
$userData = getUserData($pdo, $follower_id);
|
||||||
|
|
||||||
|
if($userData){
|
||||||
|
$valid_followers[] = $follower_id;
|
||||||
|
} else {
|
||||||
|
unfollow_user($pdo, $userid, $follower_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $valid_followers;
|
||||||
}else{
|
}else{
|
||||||
$userdata = getUserData($pdo, $userid);
|
$userdata = getUserData($pdo, $userid);
|
||||||
$followerIds = array_filter(explode(',', $userdata['follower']));
|
$followerIds = array_filter(explode(',', $userdata['follower']));
|
||||||
if($followerIds){
|
if($followerIds){
|
||||||
return $followerIds;
|
$valid_followers = [];
|
||||||
|
foreach ($followerIds as $follower_id){
|
||||||
|
$userData = getUserData($pdo, $follower_id);
|
||||||
|
|
||||||
|
if($userData){
|
||||||
|
$valid_followers[] = $follower_id;
|
||||||
|
} else {
|
||||||
|
unfollow_user($pdo, $userid, $follower_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $valid_followers;
|
||||||
}else{
|
}else{
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@@ -2672,19 +2711,11 @@ function deleteUser($pdo, $userid, $step, $job_uniqid){
|
|||||||
|
|
||||||
if($step == "delete_follow"){
|
if($step == "delete_follow"){
|
||||||
if(changeJob($pdo, $userid, $job_uniqid, "delete_follow", "running")){
|
if(changeJob($pdo, $userid, $job_uniqid, "delete_follow", "running")){
|
||||||
// フォロー・フォロワー情報を削除したい全てのアカウントを取得
|
$flw_accounts = array_merge(getFolloweeList($pdo, $userid),getFollowerList($pdo, $userid));
|
||||||
$flw_query = $pdo->prepare("SELECT *
|
|
||||||
FROM account
|
|
||||||
WHERE FIND_IN_SET(:userid, follow) > 0
|
|
||||||
OR FIND_IN_SET(:userid, follower) > 0;
|
|
||||||
");
|
|
||||||
$flw_query->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$flw_query->execute();
|
|
||||||
$flw_accounts = $flw_query->fetchAll();
|
|
||||||
|
|
||||||
foreach ($flw_accounts as $account) {
|
foreach ($flw_accounts as $account) {
|
||||||
unfollow_user($pdo, $account['userid'], $userid);
|
unfollow_user($pdo, $account, $userid);
|
||||||
unfollow_user($pdo, $userid, $account['userid']);
|
unfollow_user($pdo, $userid, $account);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ユーザーIDを削除したい全てのアカウントを取得
|
// ユーザーIDを削除したい全てのアカウントを取得
|
||||||
@@ -3585,39 +3616,44 @@ function val_AddOtherSettings($dataname, $data, $jsontext){
|
|||||||
}
|
}
|
||||||
//ユーザーのOther_Settingsが既にあるかないか(なければ空のJSONを追加)
|
//ユーザーのOther_Settingsが既にあるかないか(なければ空のJSONを追加)
|
||||||
function is_OtherSettings($pdo, $userid, $add = true){
|
function is_OtherSettings($pdo, $userid, $add = true){
|
||||||
$other_settings = getUserData($pdo, $userid)["other_settings"];
|
$other_settings = getUserData($pdo, $userid);
|
||||||
if(empty($other_settings)){
|
if($other_settings){
|
||||||
if($add === true){
|
if(empty($other_settings["other_settings"])){
|
||||||
$new_data = [];
|
if($add === true){
|
||||||
$new_json = json_encode($new_data);
|
$new_data = [];
|
||||||
|
$new_json = json_encode($new_data);
|
||||||
|
|
||||||
$pdo->beginTransaction();
|
$pdo->beginTransaction();
|
||||||
try {
|
try {
|
||||||
// UPDATE文を実行してフォロー情報を更新
|
// UPDATE文を実行してフォロー情報を更新
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET other_settings = :other_settings WHERE userid = :userid");
|
$updateQuery = $pdo->prepare("UPDATE account SET other_settings = :other_settings WHERE userid = :userid");
|
||||||
$updateQuery->bindValue(':other_settings', $new_json, PDO::PARAM_STR);
|
$updateQuery->bindValue(':other_settings', $new_json, PDO::PARAM_STR);
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
$res = $updateQuery->execute();
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
if($res){
|
if($res){
|
||||||
$pdo->commit();
|
$pdo->commit();
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "is_OtherSettings", null, "空のOtherSettingsを追加できませんでした", 3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
// ロールバック
|
// ロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
actionLog($userid, "error", "is_OtherSettings", null, "空のOtherSettingsを追加できませんでした", 3);
|
actionLog($userid, "error", "is_OtherSettings", null, $e, 4);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
}else{
|
||||||
// ロールバック
|
|
||||||
$pdo->rollBack();
|
|
||||||
actionLog($userid, "error", "is_OtherSettings", null, $e, 4);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
//unfollow_userの救済だーー!!!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
session_name('uwuzu_s_id');
|
||||||
|
session_set_cookie_params([
|
||||||
|
'lifetime' => 0,
|
||||||
|
'path' => '/',
|
||||||
|
'domain' => '',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
'samesite' => 'Lax'
|
||||||
|
]);
|
||||||
|
session_start();
|
||||||
|
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
require("../function/function.php");
|
require("../function/function.php");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
session_name('uwuzu_s_id');
|
||||||
|
session_set_cookie_params([
|
||||||
|
'lifetime' => 0,
|
||||||
|
'path' => '/',
|
||||||
|
'domain' => '',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
'samesite' => 'Lax'
|
||||||
|
]);
|
||||||
|
session_start();
|
||||||
|
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
require("../function/function.php");
|
require("../function/function.php");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uwuzu
|
uwuzu
|
||||||
1.6.5
|
1.6.6
|
||||||
2025/10/27
|
2025/11/08
|
||||||
daichimarukana,putonfps
|
daichimarukana,putonfps
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||||
|
|
||||||
|
## Version 1.6.6 (Hapuego)
|
||||||
|
2025/11/08
|
||||||
|
fix: アカウント削除時にフォロー情報が削除されない問題を修正しました!
|
||||||
|
fix: パスワードの回復機能にあるちっちゃいバグを修正しました!
|
||||||
|
chg: ユーザープロフィールページをちょっと高速化しました!
|
||||||
|
|
||||||
## Version 1.6.5 (Hapuego)
|
## Version 1.6.5 (Hapuego)
|
||||||
2025/10/27
|
2025/10/27
|
||||||
fix: ユーズに返信をするページにて、選択しているユーズがどれかを表示する点が表示されない問題を修正しました!
|
fix: ユーズに返信をするページにて、選択しているユーズがどれかを表示する点が表示されない問題を修正しました!
|
||||||
@@ -42,6 +48,7 @@ new: ブルートフォースアタックからアカウントを保護するた
|
|||||||
- last_attack_datetime:指定なし:最終ログイン失敗日時
|
- last_attack_datetime:指定なし:最終ログイン失敗日時
|
||||||
- blocked_until_datetime:指定なし:ブロック終了日時
|
- blocked_until_datetime:指定なし:ブロック終了日時
|
||||||
- datetime(datetime):指定なし:最初の失敗ログイン記録日時
|
- datetime(datetime):指定なし:最初の失敗ログイン記録日時
|
||||||
|
uwuzu_database.sqlは更新済みです。
|
||||||
|
|
||||||
## Version 1.6.4 (Hapuego)
|
## Version 1.6.4 (Hapuego)
|
||||||
2025/08/20
|
2025/08/20
|
||||||
|
|||||||
+6
-61
@@ -1,71 +1,16 @@
|
|||||||
{
|
{
|
||||||
"software": "uwuzu",
|
"software": "uwuzu",
|
||||||
"version": "1.6.5",
|
"version": "1.6.6",
|
||||||
"release_date": "2025/10/27",
|
"release_date": "2025/11/08",
|
||||||
"release_notes": "このアップデートでは、ログインに関する重大な脆弱性及びフォローの仕組みの改修、その他様々なバグの修正が含まれます。\n早急なアップデートを強く推奨します!!!!!\nなお、このアップデートでは事前にDB構造の更新が必要です。\n詳細はリリースノートをご確認ください。",
|
"release_notes": "このアップデートでは、フォローに関するバグの修正などが含まれます。\n詳細はリリースノートをご確認ください。",
|
||||||
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
|
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
|
||||||
"files": {
|
"files": {
|
||||||
"overwrite": [
|
"overwrite": [
|
||||||
"/function/function.php",
|
"/function/function.php",
|
||||||
"/ueuse/index.php",
|
"/passrecovery/badrecovery.php",
|
||||||
"/admin/addadmin.php",
|
"/passrecovery/donerecovery.php",
|
||||||
"/admin/index.php",
|
|
||||||
"/api/auth.php",
|
|
||||||
"/api/me/index.php",
|
|
||||||
"/api/ueuse/replies.php",
|
|
||||||
"/api/users/index.php",
|
|
||||||
"/api/users/unfollow.php",
|
|
||||||
"/bookmark/index.php",
|
|
||||||
"/emoji/index.php",
|
|
||||||
"/home/index.php",
|
|
||||||
"/js/view_function.js",
|
|
||||||
"/migration/index.php",
|
|
||||||
"/new.php",
|
|
||||||
"/addauthcode.php",
|
|
||||||
"/authcodechk.php",
|
|
||||||
"/authlogin.php",
|
|
||||||
"/check.php",
|
|
||||||
"/login.php",
|
|
||||||
"/success.php",
|
|
||||||
"/uwuzu_error_code.txt",
|
|
||||||
"/css/home.css",
|
|
||||||
"/abi/addabi.php",
|
|
||||||
"/nextpage/bookmarktimeline.php",
|
|
||||||
"/nextpage/followtimeline.php",
|
|
||||||
"/nextpage/foryoutimeline.php",
|
|
||||||
"/nextpage/localtimeline.php",
|
|
||||||
"/nextpage/searchtimeline.php",
|
|
||||||
"/nextpage/ueusetimeline.php",
|
|
||||||
"/notice/addnotice.php",
|
|
||||||
"/notice/index.php",
|
|
||||||
"/notification/index.php",
|
|
||||||
"/others/account_migration.php",
|
|
||||||
"/others/account_migration_done.php",
|
|
||||||
"/others/index.php",
|
|
||||||
"/others/token.php",
|
|
||||||
"/search/index.php",
|
|
||||||
"/settings/addauthcode.php",
|
|
||||||
"/settings/index.php",
|
|
||||||
"/settings/success.php",
|
|
||||||
"/settings_admin/actionlog_admin.php",
|
|
||||||
"/settings_admin/ad_admin.php",
|
|
||||||
"/settings_admin/addemoji_admin.php",
|
|
||||||
"/settings_admin/codeadmin.php",
|
|
||||||
"/settings_admin/customize_admin.php",
|
|
||||||
"/settings_admin/ipblock_admin.php",
|
|
||||||
"/settings_admin/jobs_admin.php",
|
|
||||||
"/settings_admin/maintenance_admin.php",
|
|
||||||
"/settings_admin/moderation_admin.php",
|
|
||||||
"/settings_admin/overview_admin.php",
|
|
||||||
"/settings_admin/plugin_admin.php",
|
|
||||||
"/settings_admin/role_admin.php",
|
|
||||||
"/settings_admin/serveradmin.php",
|
|
||||||
"/settings_admin/update_admin.php",
|
|
||||||
"/settings_admin/useradmin.php",
|
|
||||||
"/settings_admin/userinfo.php",
|
|
||||||
"/user/index.php",
|
"/user/index.php",
|
||||||
"/user/report.php",
|
"/server/uwuzuabout.txt",
|
||||||
"/user/success.php",
|
|
||||||
"/server/uwuzuinfo.txt",
|
"/server/uwuzuinfo.txt",
|
||||||
"/server/uwuzurelease.txt"
|
"/server/uwuzurelease.txt"
|
||||||
],
|
],
|
||||||
|
|||||||
+14
-22
@@ -155,35 +155,27 @@ if (!empty($pdo)) {
|
|||||||
$ueuse_cnt = $allueuse->rowCount();
|
$ueuse_cnt = $allueuse->rowCount();
|
||||||
|
|
||||||
//-------フォロワー取得---------
|
//-------フォロワー取得---------
|
||||||
|
|
||||||
$follower_userdata = array();
|
$follower_userdata = array();
|
||||||
if(!(empty($follower))){
|
|
||||||
foreach ($follower 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) {
|
if ($follower != false) {
|
||||||
$follower_userdata[] = $follower_userinfo;
|
$placeholders_follower = str_repeat('?,', count($follower) - 1) . '?';
|
||||||
}
|
$get_follower_sql = "SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid IN ($placeholders_follower)";
|
||||||
}
|
$follower_userQuery = $pdo->prepare($get_follower_sql);
|
||||||
|
$follower_userQuery->execute($follower);
|
||||||
|
|
||||||
|
$follower_userdata = $follower_userQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------フォロー取得---------
|
//-------フォロー取得---------
|
||||||
|
|
||||||
$follow_userdata = array();
|
$follow_userdata = array();
|
||||||
if(!(empty($follow))){
|
|
||||||
foreach ($follow 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) {
|
if ($follow != false) {
|
||||||
$follow_userdata[] = $follow_userinfo;
|
$placeholders_follow = str_repeat('?,', count($follow) - 1) . '?';
|
||||||
}
|
$get_follow_sql = "SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid IN ($placeholders_follow)";
|
||||||
}
|
$follow_userQuery = $pdo->prepare($get_follow_sql);
|
||||||
|
$follow_userQuery->execute($follow);
|
||||||
|
|
||||||
|
$follow_userdata = $follow_userQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(filter_var($userdata['iconname'], FILTER_VALIDATE_URL)){
|
if(filter_var($userdata['iconname'], FILTER_VALIDATE_URL)){
|
||||||
|
|||||||
Reference in New Issue
Block a user