比较提交

...
共修改 23 个文件,包含 1496 行新增和 16 行删除

没有与搜索条件相匹配的文件

+14
查看文件
@@ -37,3 +37,17 @@ python3 Backend/deploy.py --package '/Volumes/备份/大鱼调色/发行包/大
先从仓库审查、提交并推送,再由部署脚本同步到专项工程;脚本验证实际 SMB 挂载及基线。覆盖原文件前同目录旁路备份并核对字节,新增文件无需不存在的备份。只写明确列出的路径,不加载或输出生产配置。更新包签名、公证、票据与正式 APP 验收通过后才发布;同名包不同字节立即停止。发布后完整下载核对大小与 SHA-256,并核验较低/相同构建号的更新结果。
回滚:先备份当前文件,再恢复部署记录中对应旁路备份;禁止降低已有清单构建号来自动降级。撤下更新时备份并移走 beta.json,更新路由回到没有更新;历史安装包和诊断表保留。源代码可从产品远程仓库恢复,签名私钥及服务端数据库不属于 Git 备份。
## 微信首次扫码登录专项(2026-11-13)
本轮使用仓库 `Backend/` 为有范围的本机专项工程。新增保存生产主题 `wp-content/themes/ripro5/inc/oauth/weixin/callback.php`,仅将 `DayuColor` 加入现有扫码证明名单;同时在线 LUT 会话接口把拒绝/过期返回为 HTTP 401,让现有 1.22.1 客户端及时结束等待。无需重编 APP。
```sh
php Backend/tests/wechat_callback.php
php Backend/tests/online_luts.php
python3 Backend/deploy_wechat_login.py
```
前两项执行合成账号和 OAuth 的隔离测试,不加载生产配置;后一项仅审阅两个明确目标、SHA-256、挂载与权限。先按仓库约定完成源码提交、推送和回读,再加 `--apply --ssh-control <已认证连接>` 进行部署。脚本固定目标 SSH 主机和已确认的 NAS 原生路径,不接收或保存密码。写入前复核全部目标基线,每个覆盖文件均创建原目录分钟级旁路备份;使用原文件所有者通过原生 SSH 保留 UID/GID、权限和扩展属性,两个文件均暂存成功才替换,失败回滚已替换文件。部署报告保存每个相对路径、备份完整路径、摘要与原生元数据。回退沿用上节规则。若生产基线已变化,先重新比较,不能直接更新预期摘要来绕过保护。
此前会话目录与网络限制已在当前会话解除,无需修改 NAS 权限。真实未绑定用户扫码仍需实际验收。现状与部署结果见 [开发交接](../开发交接.md),证据见 [验证报告](../verification/WeChatLoginFix.json)。
+215
查看文件
@@ -0,0 +1,215 @@
#!/usr/bin/env python3
"""Review by default; --apply deploys only the two WeChat login fixes."""
import argparse
import base64
import datetime
import json
import os
from pathlib import Path
import shutil
import shlex
import subprocess
from deploy import ROOT, NAS, MOUNT, sha, check_mount, write_json
FILES = (
Path('wp-content/themes/ripro5/inc/oauth/weixin/callback.php'),
Path('wp-content/mu-plugins/dayu-color-online-luts.php'),
)
# Run as the existing file owner on the NAS: SMB reports synthetic Mac modes.
# No credentials or production configuration are included in this program.
NATIVE_DEPLOY = r'''
import base64, datetime, hashlib, json, os, pathlib, shutil, stat, sys, uuid
root = pathlib.Path('/vol1/1000/dayumedia/wwwroot/dayu_media')
allowed = {'wp-content/themes/ripro5/inc/oauth/weixin/callback.php',
'wp-content/mu-plugins/dayu-color-online-luts.php'}
request = json.load(sys.stdin)
assert len(request['files']) == 2
assert {r['relativePath'] for r in request['files']} == allowed
def digest(path):
return hashlib.sha256(path.read_bytes()).hexdigest()
def metadata(path):
s = path.stat()
return dict(uid=s.st_uid, gid=s.st_gid, mode=oct(stat.S_IMODE(s.st_mode)),
xattrs={k:base64.b64encode(os.getxattr(path,k)).decode()
for k in sorted(os.listxattr(path))})
def syncdir(path):
fd=os.open(str(path),os.O_RDONLY)
try: os.fsync(fd)
finally: os.close(fd)
def clone(original, destination, expected):
fd=os.open(str(destination),os.O_CREAT|os.O_EXCL|os.O_WRONLY,0o600)
os.close(fd)
shutil.copy2(original,destination)
if (destination.stat().st_uid,destination.stat().st_gid)!=(expected['uid'],expected['gid']):
os.chown(destination,expected['uid'],expected['gid'])
if stat.S_IMODE(destination.stat().st_mode)!=int(expected['mode'],8):
os.chmod(destination,int(expected['mode'],8))
# fnOS creates a system.trim_acl inherited from the parent even when the
# original has none. copy2 does not remove these destination-only xattrs.
for key in set(os.listxattr(destination))-set(expected['xattrs']):
os.removexattr(destination,key)
for key,value in expected['xattrs'].items():
os.setxattr(destination,key,base64.b64decode(value))
assert metadata(destination)==expected, 'Native metadata copy mismatch'
with destination.open('rb') as f: os.fsync(f.fileno())
stamp=datetime.datetime.now(datetime.timezone(datetime.timedelta(hours=8))).strftime('%Y%m%d%H%M')
rows=[]
stages=[]
changed=[]
result=dict(ok=False,files=rows,rolledBack=False)
try:
# Check the entire batch before creating backups or staging new content.
for item in request['files']:
target=root/item['relativePath']
assert target.resolve()==target and target.is_file(), 'Unexpected path or symlink'
original=digest(target)
source=base64.b64decode(item['sourceBase64'],validate=True)
assert hashlib.sha256(source).hexdigest()==item['sourceSHA256']
assert original in (item['expectedSHA256'],item['sourceSHA256']), 'Production baseline changed'
attrs=metadata(target)
assert attrs['uid']==os.geteuid(), 'Run as the original file owner'
row=dict(relativePath=item['relativePath'],nativeTarget=str(target),
beforeSHA256=original,sha256=item['sourceSHA256'],beforeMetadata=attrs,
status='already-current' if original==item['sourceSHA256'] else 'pending')
rows.append(row)
for row,item in zip(rows,request['files']):
if row['status']=='already-current': continue
target=pathlib.Path(row['nativeTarget'])
backup=target.with_name(target.stem+'-'+stamp+target.suffix+'bak')
clone(target,backup,row['beforeMetadata'])
assert digest(backup)==row['beforeSHA256'], 'Backup content mismatch'
row['nativeBackup']=str(backup)
syncdir(target.parent)
# Stage both files before replacing either production file.
for row,item in zip(rows,request['files']):
if row['status']=='already-current': continue
target=pathlib.Path(row['nativeTarget'])
stage=target.with_name('.dayu-wechat-stage-'+uuid.uuid4().hex)
stages.append(stage)
clone(target,stage,row['beforeMetadata'])
with stage.open('wb') as f:
f.write(base64.b64decode(item['sourceBase64'],validate=True))
f.flush(); os.fsync(f.fileno())
os.utime(stage,None)
assert metadata(stage)==row['beforeMetadata'], 'Staged metadata mismatch'
assert digest(stage)==row['sha256'], 'Staged content mismatch'
row['stage']=str(stage)
for row in rows:
if row['status']=='already-current': continue
target=pathlib.Path(row['nativeTarget'])
assert digest(target)==row['beforeSHA256'], 'Production changed before replacement'
assert metadata(target)==row['beforeMetadata'], 'Permissions changed before replacement'
os.replace(row['stage'],target)
changed.append(row)
syncdir(target.parent)
row['status']='deployed'
for row in rows:
target=pathlib.Path(row['nativeTarget'])
assert digest(target)==row['sha256']
row['afterMetadata']=metadata(target)
assert row['afterMetadata']==row['beforeMetadata'], 'Final metadata mismatch'
result['ok']=True
except Exception as e:
result['error']=str(e)
rollback_errors=[]
for row in reversed(changed):
try:
target=pathlib.Path(row['nativeTarget'])
restore=target.with_name('.dayu-wechat-restore-'+uuid.uuid4().hex)
stages.append(restore)
clone(pathlib.Path(row['nativeBackup']),restore,row['beforeMetadata'])
assert digest(restore)==row['beforeSHA256']
os.replace(restore,target); syncdir(target.parent)
row['status']='rolled-back'
except Exception as failure: rollback_errors.append(str(failure))
result['rolledBack']=bool(changed) and not rollback_errors
result['rollbackErrors']=rollback_errors
finally:
for stage in stages:
if stage.exists(): stage.unlink()
for row in rows: row.pop('stage',None)
print(json.dumps(result,ensure_ascii=False))
'''
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--apply', action='store_true')
parser.add_argument('--ssh-control', help='Existing authenticated SSH control socket; no password argument')
args = parser.parse_args()
mounts = subprocess.check_output(['/sbin/mount'], text=True).splitlines()
matches = [line for line in mounts if f' on {MOUNT} (smbfs,' in line]
assert len(matches) == 1 and '@192.168.31.21/dayumedia%' in matches[0], 'NAS SMB mount mismatch'
baseline = json.loads((ROOT/'verification/WeChatLoginBaseline.json').read_text())
expected = {row['relativePath']: row['sha256'] for row in baseline['files']}
files = []
# Validate every target before making any production change.
for relative in FILES:
source = ROOT/'Backend'/relative
target = NAS/relative
subprocess.run(['php', '-l', str(source)], check=True, capture_output=True)
assert sha(target) in (expected[str(relative)], sha(source)), 'Production baseline changed: '+str(relative)
files.append(dict(relativePath=str(relative), sourceSHA256=sha(source),
productionSHA256=sha(target), writable=os.access(target.parent, os.W_OK)))
contracts = []
for name in ('wechat_callback.php', 'online_luts.php'):
result = subprocess.run(['php', str(ROOT/'Backend/tests'/name)], check=True, capture_output=True, text=True)
report = json.loads(result.stdout)
assert report['pass']
contracts.append(dict(suite=name, count=report['count'], passed=True))
review = dict(mode='apply' if args.apply else 'review', localProject=str(ROOT/'Backend'),
nasRoot=str(NAS), files=files, contracts=contracts)
if not args.apply:
print(json.dumps(review, ensure_ascii=False, indent=2))
return
check_mount()
assert all(row['writable'] for row in files), 'Production target is read-only'
commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT, text=True).strip()
remote = subprocess.check_output(['git', 'ls-remote', 'origin', 'refs/heads/main'], cwd=ROOT, text=True).split()[0]
assert remote == commit, 'Source checkpoint must be pushed and verified first'
for relative in FILES:
saved = subprocess.check_output(['git', 'show', 'HEAD:Backend/'+str(relative)], cwd=ROOT)
assert saved == (ROOT/'Backend'/relative).read_bytes(), 'Source not committed: '+str(relative)
lock = ROOT/'Backend/.wechat-login-deployment.lock'
lock.mkdir()
write_json(lock/'owner.json', dict(pid=os.getpid(), sourceCommit=commit))
try:
request = dict(files=[dict(relativePath=str(relative), expectedSHA256=expected[str(relative)],
sourceSHA256=sha(ROOT/'Backend'/relative),
sourceBase64=base64.b64encode((ROOT/'Backend'/relative).read_bytes()).decode())
for relative in FILES])
command = ['/usr/bin/ssh', '-T', '-p', '22', '-o', 'BatchMode=yes',
'-o', 'StrictHostKeyChecking=yes']
if args.ssh_control:
command += ['-o', 'ControlPath='+args.ssh_control]
command += ['dayu@192.168.31.21', '/usr/bin/python3 -c '+shlex.quote(NATIVE_DEPLOY)]
process = subprocess.run(command, input=json.dumps(request), text=True, capture_output=True, timeout=60)
if process.returncode:
raise RuntimeError('Native SSH deployment failed: '+process.stderr.strip())
outcome = json.loads(process.stdout)
results = outcome['files']
for result in results:
relative = result['relativePath']
result['target'] = str(NAS/relative)
if 'nativeBackup' in result:
result['backup'] = str(NAS/Path(result['nativeBackup']).relative_to('/vol1/1000/dayumedia/wwwroot/dayu_media'))
if outcome['ok']:
assert sha(NAS/relative) == result['sha256'], 'SMB/native content mismatch'
write_json(ROOT/'verification/WeChatLoginDeployment.json', dict(
checkedAt=datetime.datetime.now(datetime.timezone.utc).isoformat(), sourceCommit=commit,
localProject=str(ROOT/'Backend'), nasRoot=str(NAS), files=results,
nativeResult=outcome, liveScanVerified=False,
status='files deployed; fresh unbound-account scan still required' if outcome['ok'] else 'deployment failed'))
assert outcome['ok'], json.dumps(outcome,ensure_ascii=False)
print(json.dumps(dict(deployed=len(results), files=results), ensure_ascii=False, indent=2))
finally:
def ignore_missing(function, path, exception):
if not isinstance(exception[1], FileNotFoundError):
raise exception[1]
shutil.rmtree(lock, onerror=ignore_missing)
if __name__ == '__main__':
main()
+13
查看文件
@@ -55,6 +55,19 @@ check(body(Dayu_Color_Online_LUTs::logout(new Request(array(),$restored['token']
$session=array('app_name'=>'DayuColor','device_uuid'=>$device,'expires_at'=>time()+120,'status'=>'pending','user_id'=>7);
$transients[$login]=$session;
check(body(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))))['status']==='pending','pending login cannot mint a credential');
$bound=0;
check(body(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))))['status']==='pending','first unbound device can wait for WeChat approval');
$transients[$login]['status']='approved';
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'approval cannot bypass missing UUID binding');
check(isset($transients[$login])&&!isset($options['dayu_color_lut_once_'.hash('sha256',$key)]),'missing binding does not consume the login session');
$transients[$login]=$session;$transients[$login]['status']='denied';$transients[$login]['message']='该 UUID 已绑定其他账号,请先解绑';
$failed=Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device)));
check(denied($failed,401)&&$failed->message===$transients[$login]['message'],'callback denial immediately stops installed client polling with the actual reason');
$transients[$login]['status']='expired';
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'expired callback stops installed client polling');
$transients[$login]=$session;$transients[$login]['expires_at']=time()-1;
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'past session deadline stops polling');
$transients[$login]=$session;$bound=7;
$transients[$login]['app_name']='FCPXSoundEffects';check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'another product login rejected');
$transients[$login]=$session;$transients[$login]['status']='approved';
$issued=Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device)));$token=body($issued)['token']??'';
+84
查看文件
@@ -0,0 +1,84 @@
<?php
// Execute the actual theme callback with synthetic OAuth and WordPress services.
// Never load wp-config.php, contact WeChat, or read/change real accounts.
namespace Yurun\OAuthLogin\Weixin {
class OAuth2 {
public $http, $openid='synthetic-wechat-openid';
public function __construct(...$args) { $this->http=new \stdClass; }
public function getAccessToken($state) { return 'synthetic-provider-token'; }
public function getUserInfo() { return array('nickname'=>'测试用户', 'headimgurl'=>'https://example.invalid/avatar'); }
}
}
namespace {
define('ABSPATH', __DIR__.'/'); define('MINUTE_IN_SECONDS', 60);
class CallbackRedirect extends \RuntimeException {}
class CallbackRejected extends \RuntimeException {}
class LoginEvents {
public $events=array();
public function log_login_event($stage,$fields=array()) { $this->events[]=array('stage'=>$stage,'fields'=>$fields); }
}
class CallbackDB {
public $usermeta='synthetic_usermeta';
public function prepare(...$args) { return $args; }
public function get_var($query) { return 7; }
}
$wpdb=new CallbackDB;
$GLOBALS['dayu_macos_app_auth']=new LoginEvents;
$transients=array(); $checks=array();
function _cao($key) { return array('appid'=>'synthetic','appkey'=>'synthetic'); }
function home_url($path) { return 'https://dayu.media'.$path; }
function wp_parse_url($url) { return parse_url($url); }
function sanitize_text_field($value) { return trim(strip_tags($value)); }
function set_transient($key,$value,$ttl) { global $transients; $transients[$key]=$value; return true; }
function get_current_user_id() { return 0; }
function wp_set_current_user($id) {}
function wp_set_auth_cookie(...$args) {}
function get_user_by(...$args) { return (object)array('user_login'=>'synthetic-user'); }
function do_action(...$args) {}
function wp_safe_redirect($url) { throw new CallbackRedirect; }
function cao_wp_die(...$args) { throw new CallbackRejected; }
function is_wp_error($value) { return false; }
function check($passed,$name) {
global $checks;
$checks[]=array('name'=>$name,'pass'=>(bool)$passed);
if (!$passed) { fwrite(STDERR,'FAIL '.$name."\n"); exit(1); }
}
// Redirects throw before the production callback's exit statements.
function callback_proof($app, $overrides=array(), $host='dayu.media', $provider_state=true) {
global $transients;
$transients=array(); $GLOBALS['dayu_macos_app_auth']->events=array();
$query=array_merge(array('action'=>'app_wechat_auth_check','app_name'=>$app,
'fcpxqwen_session'=>str_repeat('a',40),'device_uuid'=>'00000000-0000-0000-0000-000000000001'),$overrides);
$_SESSION=array('oauth_rurl'=>'https://'.$host.'/wp-admin/admin-ajax.php?'.http_build_query($query));
if ($provider_state) { $_SESSION['YURUN_WEIXIN_STATE']='synthetic-state'; }
$_GET=array('code'=>'synthetic-code');
try { include $GLOBALS['callback_source']; } catch (CallbackRedirect $e) {} catch (CallbackRejected $e) {}
return $_SESSION['dayu_fcpx_wechat_oauth']??null;
}
$callback_source=$argv[1]??__DIR__.'/../wp-content/themes/ripro5/inc/oauth/weixin/callback.php';
session_start();
$proof=callback_proof('DayuColor');
check(is_array($proof),'DayuColor first scan writes OAuth proof without any prior UUID binding');
check($proof['session_hash']===hash('sha256',str_repeat('a',40))
&&$proof['device_hash']===hash('sha256','00000000-0000-0000-0000-000000000001')
&&$proof['openid_hash']===hash('sha256','synthetic-wechat-openid'),
'proof binds this login session, hardware UUID and provider identity');
check(abs(time()-$proof['issued_at'])<=1,'proof has a fresh server timestamp');
check(($transients['dayu_fcpx_oauth_proof_'.hash('sha256',str_repeat('a',40))]??null)===$proof,
'transient fallback matches proof across PHP session boundaries');
check(in_array('oauth_proof_written',array_column($GLOBALS['dayu_macos_app_auth']->events,'stage'),true),
'successful proof is visible in existing login diagnostics');
foreach (array('FCPXQwen3ASR','FCPXPython','FCPXSoundEffects','qwenzhiyin','DayuDownie','DayuLightFactory') as $app) {
check(is_array(callback_proof($app)),'existing app callback preserved: '.$app);
}
check(callback_proof('UnknownApp')===null,'unrecognized apps do not receive proof');
check(callback_proof('DayuColor',array(),'foreign.example')===null,'foreign redirect host cannot receive proof');
check(callback_proof('DayuColor',array('action'=>'other_action'))===null,'wrong callback action cannot receive proof');
check(callback_proof('DayuColor',array('fcpxqwen_session'=>'short'))===null,'invalid login session cannot receive proof');
check(callback_proof('DayuColor',array('device_uuid'=>'random-client-id'))===null,'non-hardware UUID cannot receive proof');
check(callback_proof('DayuColor',array(),'dayu.media',false)===null,'browser cookie or redirect alone cannot bypass provider state');
session_destroy();
echo json_encode(array('pass'=>true,'count'=>count($checks),
'scope'=>'Actual scoped theme callback with synthetic OAuth and WordPress services; no live scan or user data.',
'checks'=>$checks),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)."\n";
}
@@ -75,6 +75,11 @@ final class Dayu_Color_Online_LUTs {
if (!$device || !preg_match('/^[A-Za-z0-9_-]{32,80}$/D', $key)) { return self::error('login', '登录会话无效,请重新登录。', 400); }
$transient='dayu_app_login_' . hash('sha256', $key); $session=get_transient($transient);
if (!is_array($session) || intval($session['expires_at'] ?? 0) < time() || ($session['app_name'] ?? '') !== self::APP || !hash_equals((string)($session['device_uuid'] ?? ''), $device)) { return self::error('expired', '登录会话已过期,请重新登录。', 401); }
// Installed clients stop polling on 401. Do not leave a denied callback
// looking like a pending login until the ten-minute timer expires.
if (in_array($session['status'] ?? '', array('denied', 'expired'), true)) {
return self::error('login_failed', sanitize_text_field($session['message'] ?? '微信登录失败,请重新登录。'), 401);
}
if (($session['status'] ?? '') !== 'approved') { return self::response(array('status'=>sanitize_key($session['status'] ?? 'pending'), 'message'=>sanitize_text_field($session['message'] ?? '等待微信登录'))); }
$user_id=intval($session['user_id'] ?? 0);
if (!$user_id || self::bound_user($device) !== $user_id || !get_user_by('ID', $user_id)) { return self::error('binding', '账号绑定已变化,请重新登录。', 401); }
@@ -0,0 +1,280 @@
<?php
if (!defined('ABSPATH')) {die;} // Cannot access directly.
//启用 session - 检查是否已经启动
if (!session_id()) {
session_start();
}
$dayu_login_log = function ($stage, $fields = array()) {
if (isset($GLOBALS['dayu_macos_app_auth'])
&& is_object($GLOBALS['dayu_macos_app_auth'])
&& method_exists($GLOBALS['dayu_macos_app_auth'], 'log_login_event')) {
$GLOBALS['dayu_macos_app_auth']->log_login_event($stage, $fields);
}
};
//获取后台配置
$wxConfig = _cao('oauth_weixin');
$wxOAuth = new \Yurun\OAuthLogin\Weixin\OAuth2($wxConfig['appid'], $wxConfig['appkey']);
// 尝试提高健壮性:强制 IPv4、设置超时与重试,规避服务器 IPv6/DNS 异常和偶发网络抖动
try {
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
$wxOAuth->http->option(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
}
} catch (\Throwable $e) {
// 忽略设置失败
}
// 毫秒
$wxOAuth->http->connectTimeout = 10000; // 10s 连接超时
$wxOAuth->http->timeout = 15000; // 15s 总超时
$wxOAuth->http->retry = 1; // 失败重试 1 次
if (isset($wxConfig['agent']) && $wxConfig['agent']) {
$wxOAuth->loginAgentUrl = esc_url(home_url('/oauth/weixinagent'));
}
// 防止未设置触发 Notice
if (empty($_SESSION['YURUN_WEIXIN_STATE'])) {
cao_wp_die('非法访问,没有经过第三方登录返回');
}
// 获取accessToken,把之前存储的state传入,会自动判断。
// 第三方返回异常(例如 code been used)时,当前代码未捕获会导致致命错误。
// 这里做一次兜底处理,提示用户并引导其重试登录。
try {
$accessToken = $wxOAuth->getAccessToken($_SESSION['YURUN_WEIXIN_STATE']);
} catch (\Throwable $e) {
// 清理已用的 state,避免重复使用
unset($_SESSION['YURUN_WEIXIN_STATE']);
// 记录错误便于排查,但不给用户暴露底层异常内容
if (function_exists('error_log')) {
error_log('Weixin OAuth getAccessToken failed: ' . $e->getMessage());
// 进一步主动探测一次接口,记录更详细的网络错误信息(不影响业务流程)
try {
$probe = new \Yurun\Util\HttpRequest();
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
$probe->option(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
}
$probe->connectTimeout = 8000;
$probe->timeout = 12000;
$res = $probe->get('https://api.weixin.qq.com/sns/oauth2/access_token', array(
'appid' => $wxConfig['appid'],
'secret' => $wxConfig['appkey'],
'code' => isset($_GET['code']) ? $_GET['code'] : '',
'grant_type' => 'authorization_code',
));
$snippet = substr($res->body(), 0, 200);
error_log('Weixin OAuth probe status=' . $res->getStatusCode() . ' errno=' . $res->getErrno() . ' error=' . $res->getError() . ' body=' . $snippet);
} catch (\Throwable $e2) {
error_log('Weixin OAuth probe exception: ' . $e2->getMessage());
}
}
// 给出友好提示并提供重新发起登录的入口,避免 Fatal Error 白屏
$restartUrl = esc_url(home_url('/oauth/weixin')) . (isset($_SESSION['oauth_rurl']) ? ('?rurl=' . rawurlencode($_SESSION['oauth_rurl'])) : '');
$msg = '授权码已失效或被重复使用,请返回后重试(请勿刷新回调页)。<br><a href="' . $restartUrl . '">点击这里重新发起微信登录</a>';
cao_wp_die('微信登录失败', $msg);
}
$openid = $wxOAuth->openid; // 唯一ID
$dayu_login_log('oauth_provider_callback', array(
'has_oauth_code' => !empty($_GET['code']),
'has_openid' => !empty($openid),
'has_php_session' => session_status() !== PHP_SESSION_NONE,
));
// 兼容网络异常/返回非JSON导致的空结果:
// 当请求失败时,yurun-http 返回 null,未抛异常,这里显式拦截避免白屏
if (empty($accessToken) || empty($openid)) {
$raw = isset($wxOAuth->result) ? $wxOAuth->result : null;
if (function_exists('error_log')) {
// 记录原始返回,便于排查(一般为 null 或包含 errcode/errmsg)
error_log('Weixin OAuth getAccessToken returned empty. result=' . (is_array($raw) ? json_encode($raw, JSON_UNESCAPED_UNICODE) : var_export($raw, true)));
}
// 进一步主动探测一次接口,记录更详细的网络错误信息(不影响业务流程)
try {
$probe = new \Yurun\Util\HttpRequest();
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
$probe->option(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
}
$probe->connectTimeout = 8000;
$probe->timeout = 12000;
$res = $probe->get('https://api.weixin.qq.com/sns/oauth2/access_token', array(
'appid' => $wxConfig['appid'],
'secret' => $wxConfig['appkey'],
'code' => isset($_GET['code']) ? $_GET['code'] : '',
'grant_type' => 'authorization_code',
));
$snippet = substr($res->body(), 0, 200);
error_log('Weixin OAuth probe status=' . $res->getStatusCode() . ' errno=' . $res->getErrno() . ' error=' . $res->getError() . ' body=' . $snippet);
} catch (\Throwable $e2) {
error_log('Weixin OAuth probe exception: ' . $e2->getMessage());
}
$restartUrl = esc_url(home_url('/oauth/weixin')) . (isset($_SESSION['oauth_rurl']) ? ('?rurl=' . rawurlencode($_SESSION['oauth_rurl'])) : '');
$msg = '未能获取微信授权凭证,可能由于服务器无法连接微信接口、网络波动,或回调参数已过期。<br><a href="' . $restartUrl . '">点击这里重新发起微信登录</a>';
cao_wp_die('微信登录失败', $msg);
}
try {
$userInfo = $wxOAuth->getUserInfo(); // 第三方用户信息,失败也可能抛异常
} catch (\Throwable $e) {
if (function_exists('error_log')) {
error_log('Weixin OAuth getUserInfo failed: ' . $e->getMessage());
}
cao_wp_die('微信登录失败', '获取用户信息失败,请返回后重试。');
}
// 防御性校验:避免空数组/空字段导致后续逻辑不执行而白屏
if (empty($userInfo) || !is_array($userInfo) || (empty($userInfo['nickname']) && empty($userInfo['headimgurl']))) {
if (function_exists('error_log')) {
error_log('Weixin OAuth getUserInfo returned invalid: ' . var_export($userInfo, true));
}
$restartUrl = esc_url(home_url('/?oauth=weixin'));
$msg = '未能获取到完整的微信用户资料,请返回后重试。<br><a href="' . $restartUrl . '">点击这里重新发起微信登录</a>';
cao_wp_die('微信登录失败', $msg);
}
// Dayu macOS APP 设备绑定必须能证明本次跳转确实经过了微信 OAuth,不接受仅有旧 WordPress Cookie 的回调。
$dayu_oauth_rurl = isset($_SESSION['oauth_rurl']) ? (string) $_SESSION['oauth_rurl'] : '';
$dayu_target = $dayu_oauth_rurl !== '' ? wp_parse_url($dayu_oauth_rurl) : false;
$dayu_home = wp_parse_url(home_url('/'));
if (is_array($dayu_target)
&& is_array($dayu_home)
&& !empty($dayu_target['host'])
&& !empty($dayu_home['host'])
&& hash_equals(strtolower((string) $dayu_home['host']), strtolower((string) $dayu_target['host']))) {
$dayu_query = array();
parse_str((string) ($dayu_target['query'] ?? ''), $dayu_query);
$dayu_session_key = sanitize_text_field((string) ($dayu_query['fcpxqwen_session'] ?? ''));
$dayu_device_uuid = strtoupper(sanitize_text_field((string) ($dayu_query['device_uuid'] ?? '')));
$dayu_app_name = sanitize_text_field((string) ($dayu_query['app_name'] ?? ''));
$dayu_trace_id = sanitize_text_field((string) ($dayu_query['trace_id'] ?? ''));
if (($dayu_query['action'] ?? '') === 'app_wechat_auth_check'
&& in_array($dayu_app_name, array('FCPXQwen3ASR', 'FCPXPython', 'FCPXSoundEffects', 'qwenzhiyin', 'DayuDownie', 'DayuLightFactory', 'DayuColor'), true)
&& preg_match('/^[A-Za-z0-9_-]{32,80}$/', $dayu_session_key)
&& preg_match('/^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$/', $dayu_device_uuid)) {
$dayu_oauth_proof = array(
'session_hash' => hash('sha256', $dayu_session_key),
'device_hash' => hash('sha256', $dayu_device_uuid),
'openid_hash' => hash('sha256', (string) $openid),
'issued_at' => time(),
);
$_SESSION['dayu_fcpx_wechat_oauth'] = $dayu_oauth_proof;
set_transient(
'dayu_fcpx_oauth_proof_' . hash('sha256', $dayu_session_key),
$dayu_oauth_proof,
10 * MINUTE_IN_SECONDS
);
$dayu_login_log('oauth_proof_written', array(
'trace_id' => $dayu_trace_id,
'app_name' => $dayu_app_name,
'device_uuid' => $dayu_device_uuid,
'has_openid' => !empty($openid),
'proof_written' => true,
'proof_transient' => true,
));
} else {
$dayu_login_log('oauth_proof_not_written', array(
'trace_id' => $dayu_trace_id,
'app_name' => $dayu_app_name,
'device_uuid' => $dayu_device_uuid,
'has_openid' => !empty($openid),
'proof_written' => false,
));
}
}
// 处理本地业务逻辑
//
if ($openid && $userInfo) {
$_prefix = 'weixin';
$_openid_meta_key = 'open_' . $_prefix . '_openid';
// 初始化信息
$metaInfo = array(
'openid' => $openid,
'name' => $userInfo['nickname'],
'bind' => 1,
'avatar' => $userInfo['headimgurl'],
);
if (!empty($userInfo['unionid'])) {
$metaInfo['unionid'] = $userInfo['unionid'];
}
global $wpdb, $current_user;
// 查询meta
$user_exist = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key=%s AND meta_value=%s", $_openid_meta_key, $openid));
// 如果当前用户已登录,而$user_exist存在,即该开放平台账号连接被其他用户占用了,不能再重复绑定了
$current_user_id = get_current_user_id();
if ($current_user_id != 0 && isset($user_exist) && $current_user_id != $user_exist) {
cao_wp_die('绑定失败,可能之前已有其他账号绑定,请先登录其他账户解绑。');
}
if (isset($user_exist) && (int) $user_exist > 0) {
// 该开放平台账号已连接过WP系统,再次使用它直接登录
$user_exist = (int) $user_exist;
if (function_exists('dayu_sync_user_payout_wechat_openid')) {
dayu_sync_user_payout_wechat_openid($user_exist, $openid);
}
if (!empty($metaInfo['unionid'])) {
update_user_meta($user_exist, 'open_' . $_prefix . '_unionid', $metaInfo['unionid']);
}
wp_set_current_user($user_exist);
wp_set_auth_cookie($user_exist);
$user = get_user_by('id', $user_exist);
do_action('wp_login', $user->user_login, $user); // 保证挂载的action执行
wp_safe_redirect($_SESSION['oauth_rurl']);
exit;
} elseif ($current_user_id) {
// Open 连接未被占用且当前已登录了本地账号, 那么直接绑定信息到该账号 case: 从个人资料设置中点击了绑定社交账号等操作
update_user_meta($current_user_id, 'open_' . $_prefix . '_openid', $metaInfo['openid']);
update_user_meta($current_user_id, 'open_' . $_prefix . '_bind', $metaInfo['bind']);
update_user_meta($current_user_id, 'open_' . $_prefix . '_name', $metaInfo['name']);
update_user_meta($current_user_id, 'open_' . $_prefix . '_avatar', $metaInfo['avatar']);
if (function_exists('dayu_sync_user_payout_wechat_openid')) {
dayu_sync_user_payout_wechat_openid($current_user_id, $openid);
}
if (!empty($metaInfo['unionid'])) {
update_user_meta($current_user_id, 'open_' . $_prefix . '_unionid', $metaInfo['unionid']);
}
wp_safe_redirect($_SESSION['oauth_rurl']);
exit;
} else {
// 该开放平台账号未连接过WP系统,使用它登录并分配和绑定一个WP本地新用户
$login_name = "u" . mt_rand(1000, 9999) . mt_rand(1000, 9999);
$user_pass = wp_generate_password(64, true, true);
$nickname = $metaInfo['name'];
$userdata = array(
'user_login' => $login_name,
'user_email' => $login_name.'_mail@no.com',
'display_name' => $nickname,
'nickname' => $nickname,
'user_pass' => $user_pass,
'role' => get_option('default_role'),
'first_name' => $nickname,
);
$user_id = wp_insert_user($userdata);
if (is_wp_error($user_id)) {
echo $user_id->get_error_message();
} else {
// 更新用户字段
update_user_meta($user_id, 'open_' . $_prefix . '_openid', $metaInfo['openid']);
update_user_meta($user_id, 'open_' . $_prefix . '_bind', $metaInfo['bind']);
update_user_meta($user_id, 'open_' . $_prefix . '_name', $metaInfo['name']);
update_user_meta($user_id, 'open_' . $_prefix . '_avatar', $metaInfo['avatar']);
update_user_meta($user_id, 'user_avatar_type',$_prefix);
if (function_exists('dayu_sync_user_payout_wechat_openid')) {
dayu_sync_user_payout_wechat_openid($user_id, $openid);
}
if (!empty($metaInfo['unionid'])) {
update_user_meta($user_id, 'open_' . $_prefix . '_unionid', $metaInfo['unionid']);
}
//登录
wp_set_auth_cookie($user_id, true, false);
$user = get_user_by('id', $user_id);
do_action('wp_login', $user->user_login, $user); // 保证挂载的action执行
wp_safe_redirect($_SESSION['oauth_rurl']);
}
exit;
}
} else {
// 理论不会到达,但为防止意外(例如上游返回结构变化),兜底提示,避免白屏
cao_wp_die('微信登录失败', '授权返回数据不完整,请重新尝试登录。');
}
+16
查看文件
@@ -0,0 +1,16 @@
{
"title": "大鱼调色 1.22.1 公测版|在线 LUT 自动预览与统一分类",
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.22.1(构建 133)支持打开浏览器自动批量预览在线 LUT,将在线与本地目录放在同一分类栏,点击在线 LUT 即可安装到对应本地分类并应用。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.22.1(构建 133)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 插件安装和本地调色无需登录、激活码或机器码。在线 LUT 需要登录大鱼账号并具备访问权限。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.22.1 在线 LUT 自动预览与统一分类</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>打开浏览器即可批量查看在线效果。</strong> 浏览器自动使用当前缓存帧,加载当前页在线 LUT 的效果缩略图,无需逐个点击预览。如果首次打开还没有缓存帧,会在获得首帧后自动补载。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>在线与本地共用分类栏。</strong> “在线 LUT”总分类下列出在线子分类;本地文件夹支持二级及更深层级,可展开或折叠,方便按用途整理。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>点击在线 LUT 后安装并应用。</strong> 文件校验通过后保存到本地对应分类,可在“已安装 LUT / 对应分类”中找到并离线使用。重复安装会复用已有文件,在线预载失败也不影响本地 LUT 操作。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在线预览会将当前缓存帧的 PNG 缩略图发送到 dayu.media,最长边为 640 像素,用于批量生成效果图。服务器仅在内存处理,不保存预览帧,不上传视频文件。同一次打开期间,移动播放头不会连续上传;需要换用其他画面时点击“更新预览”。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本次正式版已在 Final Cut Pro 12.4 验证自动预览、点击安装应用、原图划像和播放。APP 与 PKG 均已完成正式签名和 Apple 公证;Motion 本轮未复测。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.22.0 在线 LUT 资源库</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>1.22.0 首次加入大鱼在线 LUT 目录、分类搜索与下载安装,并提供主 App 账号识别和微信登录入口。1.22.1 在此基础上完善自动预览、统一分类和本地层级目录。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.8 多层调色与拖动优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>多层调色减少 GPU 等待。几何蒙版省去多余的色彩转换,羽化与部分覆盖继续按原方式混合。在 Apple M4 的插件单帧渲染测试中,4K 曝光加 HSL 蒙版由 87.7 毫秒降到 75.0 毫秒,一级 CST 加蒙版由 49.5 毫秒降到 42.8 毫秒。128 帧对照输出逐字节一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>从 1.21.6 升级后,蜘蛛盘、曲线、一级白平衡轮和颜色分级轮会合并拖动中的参数写入。松手提交最终值,每次拖动可一次撤销。曲线和两种色轮已在 Final Cut Pro 12.4 工作台验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.6 LUT 浏览器更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>点击已生成的缩略图时,右侧划像直接复用这张图,左侧原图和列表缩略图继续显示。移动播放头后,新预览在后台生成,就绪后再替换。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>缩略图和划像按源帧比例显示,竖屏、方形和宽画幅都能保留原构图。同一次打开期间,点选 LUT 时列表顺序保持稳定。重新打开浏览器后,最近成功应用的 LUT 会排到前面。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.3 高清 LUT 预览与划像对比</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>打开“风格 LUT”的缩略图浏览库,勾选底部的“高清预览”。缩略图从 640×360 源帧生成双倍像素图,重开浏览器时会记住此设置。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>选中一个 LUT 后,右侧大图显示同一帧。左侧是应用当前 LUT 前的画面,右侧是 100% LUT 效果。拖动分界线或下方滑杆,即可查看画面细节和颜色差异Line truncated
"excerpt": "大鱼调色 1.22.1(构建 133)支持打开浏览器自动批量预览在线 LUT,在线与本地共用分类栏,点击即可安装并应用;本地目录支持二级及更深分类。已签名公证,包含整合效果和 16 个独立模块。",
"seo": {
"title": {
"value": "大鱼调色 1.22.1 公测版|在线 LUT 自动预览与统一分类"
},
"description": {
"value": "大鱼调色 1.22.1 适用于 Final Cut Pro 和 Motion,支持自动批量预览在线 LUT、在线与本地统一分类、点击安装应用及本地二级目录。已签名公证的 PKG 包含完整主 App、整合效果及 16 个独立模块。"
},
"keywords": {
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,LUT,高清缩略图,划像对比,局部马赛克,蒙版追踪,Vision,在线LUT,自动预览,LUT分类"
}
}
}
+5
查看文件
@@ -0,0 +1,5 @@
{
"resource": {
"cao_original_filename": "大鱼调色-1.22.1.pkg"
}
}
+1 -1
查看文件
@@ -4,7 +4,7 @@
远程 `https://dayu.media/git/dayu/dayu-color.git`,main。实际编译节点 `7f833757da243f2a4610c23c36ec278b44c80ad4`,独立 HTTPS 检出核对921个跟踪文件。克隆后 `git switch --detach 7f833757da243f2a4610c23c36ec278b44c80ad4` 恢复 APP 源码;工具用 main 最新交付记录。Xcode 27.1、FxPlug SDK 4.3.5、Apple Silicon、macOS 14.6+ 与锁定 ColorManagement 依赖。通过 `tools/deliver.py` 构建和正式安装,验收后 `Packaging/build_pkg.py` 制包。主 ID `com.dayu.color`,服务 `com.dayu.color.XPC`,团队 B3W25FX5H5;证书、私钥、公证 profile 和 Git 账号独立恢复。
此前代理导致 S3 分片上传失败;用户授权仅 Apple 上传地址临时直连并恢复,原 Release 完整上传并获 Accepted,原代理完整字节和实际系统状态已恢复。详见 [公证记录](verification/UnifiedLUTNotaryResubmission133.json)。PKG 公证 `b1f73787-263b-47d7-b126-68d858437594` Accepted,20项验包通过;最终包44,557,648字节,SHA-256 `a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663`。[验包](verification/Package1.22.1.json)。版本标签、Git Release下载和最终恢复检出仍在继续;站点文章/更新通道仍1.21.8(126),本轮无后端部署。[当前交接](开发交接.md)
此前代理导致 S3 分片上传失败;用户授权仅 Apple 上传地址临时直连并恢复,原 Release 完整上传并获 Accepted,原代理完整字节和实际系统状态已恢复。详见 [公证记录](verification/UnifiedLUTNotaryResubmission133.json)。PKG 公证 `b1f73787-263b-47d7-b126-68d858437594` Accepted,20项验包通过;最终包44,557,648字节,SHA-256 `a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663`。[验包](verification/Package1.22.1.json)。发行标签 `v1.22.1-unified-luts-20261111` 指向 `cdf23fb4fd1863867945e528ae060522d566b457`,已远端核验。独立HTTPS检出逐字节核对939个文件、255个APP构建输入与实际编译节点一致,Git完整性通过,无LFS/子模块。[恢复核验](verification/Recovery1.22.1.json)。[Release431](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.22.1-unified-luts-20261111) 附件70的草稿及发布后完整下载均匹配44,557,648字节与上述SHA-256,[下载记录](verification/Release1.22.1.json)。当前包保留在 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.22.1.pkg`,临时下载、恢复检出和本轮生成APP均已清理。2026-11-12按用户要求仅更新文章15792的下载链接与原文件名至1.22.1(133),WordPress附件15979,新包已完整下载并核对签名、公证票据、44,557,648字节与上述SHA-256。随后同步1.22.1标题、摘要、正文更新记录、安装说明与SEO,并补齐1.22.0在线LUT记录;已完成认证回读、普通及新请求的前台核验。价格、会员权限和历史图片保留。[文章内容验证](verification/Article1.22.1.json) · [文章链接验证](verification/ArticleLink1.22.1.json)。主APP更新通道未改,仍1.21.8(126);无服务器源码部署。[当前交接](开发交接.md)
---
@@ -0,0 +1,34 @@
# 微信登录修复上线前历史
以下为历史记录,现状以项目开发交接为准。
### 2026-11-13 本会话部署接续(进行中)
用户明确要求读取交接并上线微信登录修复,部署授权继续有效。已验证当前 SMB 可列举、新建、重命名和删除本轮空测试目录;两个目标目录及 Git 锁目录现均可写,远端 main 可回读,未修改 NAS 权限。生产两文件仍与原始基线一致。67 项隔离检查和部署审阅再次通过;仅部署下列两个 PHP 文件,保留现有 Xcode 工程排序差异。真实 NAS 权限分别为 UID/GID 1000:1001、callback.php 0705、online-luts.php 0700;正式替换须保留这些权限及现有扩展属性,不能以 SMB 的合成 0700 显示推断原始权限。先保存修复检查点,再部署并核验运行端。
### 2026-11-13 报错复核
用户继续反馈“未检测到本次微信OAuth确认”。已读取最新生产回调及诊断:北京时间 00:01:52 和 00:03:09 的两次新尝试均由 `oauth_proof_not_written` 进入 `wechat_oauth_proof_required`;生产回调名单仍缺 `DayuColor`。两文件 SHA-256 仍与上轮旧生产基线一致,修复尚未上线。NAS 目标和 Git 锁目录仍不可写,未尝试绕过权限;本轮无实现改动,未重复执行已通过的 67 项检查。复核记录已追加至 [验证报告](verification/WeChatLoginFix.json),交接未能提交/推送的原因沿用下节。下一步仍是开放目录写权限及联网后保存并部署两文件,随后在 APP 发起新扫码,已拒绝的旧会话不能用于验收。
用户随后明确“授权并部署”,部署授权持续有效,**无需再次请求用户同意部署**。已重新执行部署预检,67 项检查通过,生产摘要仍等于旧基线;实际执行 `python3 Backend/deploy_wechat_login.py --apply`,在任何生产写入前由 `check_mount()` 返回 `AssertionError: 目标共享不可写`,退出码 1。Git 锁目录仍不可写,`git ls-remote` 仍报 `Could not resolve host: dayu.media`。未生成生产备份、未部署、未提交或推送;需要改变会话的实际目录/网络权限配置,聊天中的同意未改变这些系统权限。权限生效后直接继续提交、部署与线上核验,不再询问是否授权。
用户提供截图确认客户端“完整访问权限”已开启。只读检查 `/Users/mac/.codex/config.toml` 同样为 `sandbox_mode = "danger-full-access"`、`approval_policy = "never"`。当前命令进程 UID 501;本机 Git 锁目录属 UID 501/0755,NAS 两个目标父目录属 UID 501/0700,挂载参数没有 `read-only` 标志,但当前调用对三个目录的 `os.access(W_OK)` 均为 false,Git 请求仍无法解析域名。结论是客户端显示/本地配置与当前调用的实际执行限制不一致,具体未生效原因尚未确认;此前将其描述为 NAS 只读不准确,不应让用户继续重复授权或改 NAS 权限。尚未部署,授权持续有效。[诊断证据](verification/WeChatLoginFix.json)
用户授权使用指定账号资料通过 NAS SSH 检查并修复权限。已安全读取资料(仅账号/密码两行,没有端口字段),未输出凭据;先以默认 22 端口执行无密码、严格主机密钥校验的 `BatchMode` 连接检查,请求只读 `id`。结果为 `ssh: connect to host 192.168.31.21 port 22: Operation not permitted`,退出码 255,在账号验证之前即本地拒绝;没有发送密码、执行远端命令或修改 NAS 权限。直接局域网 IP 的 SSH 同样受限,进一步确认当前阻塞在本地执行环境。未验证 SSH 账号有效性或实际服务端口,不将猜测当作 NAS 配置事实。仍未提交/推送/部署;权限恢复后沿用已有部署授权继续,服务端权限只在获得实际异常证据后做最小修复。
后续用户提供 NAS SSH 设置截图,现已确认服务开关开启、实际端口 22、`dayu` 管理员允许 SSH 登录;这补齐上一条的端口配置证据,未证明当前命令执行环境已放行或账号已通过认证。既有 SSH 错误仍为连接阶段的 `Operation not permitted`,不应让用户继续修改 NAS SSH 开关或盲目调整目录权限。未重复同一受限连接,未更改服务端;可由用户在 Mac 系统终端执行 `ssh -p 22 dayu@192.168.31.21`,独立区分系统终端可达性与当前会话限制。部署和 Git 状态保持未完成。
## 2026-11-12 微信首次登录修复:本地通过,待部署
用户反馈“微信登录还是有问题,特别是没有绑定 UUID 的用户”。已核对 `main`、远程和正式安装 1.22.1(133);工程已有的 Security 引用排序差异未修改。基线提交 `8c2f226d4369d5117ec626c20a05543be95143c5`。
根因是生产主题 `wp-content/themes/ripro5/inc/oauth/weixin/callback.php` 的本次 OAuth 证明应用名单缺少 `DayuColor`。现有日志中 13 次大鱼调色扫码均为 `oauth_proof_not_written`,12 次明确以 `wechat_oauth_proof_required` 拒绝;现有硬件自动登录不会走此入口。另一个问题是在线 LUT 会话接口把 `denied` 当 HTTP 200 返回,1.22.1 客户端因此继续等待到十分钟超时。
已从生产逐字节保存这两个文件的基线;本地 `Backend/` 补入主题回调有范围副本,只增加 `DayuColor`;在线 LUT 会话对 `denied`/`expired` 返回现有客户端可终止轮询的 HTTP 401 和原失败原因。UUID、账号、有效期、一次性兑换及权限校验保留。APP 二进制、正式安装、PKG、Release、文章与更新通道均未改。
17 项实际主题回调隔离检查与 50 项在线接口检查通过;在旧生产基线上,新增回归分别重现缺失证明和失败后不终止的问题。PHP 语法、Python AST、部署预检通过。[基线](verification/WeChatLoginBaseline.json) · [完整验证与范围](verification/WeChatLoginFix.json)。这是使用合成 OAuth/账号的本地检查,尚未做真实未绑定账号扫码验收。
**尚未上线,未提交、未推送本轮改动。** 本会话生产 NAS 两个目标父目录均不可写;按现有 `tools/checkpoint.py` 保存基线时,创建 `/Users/mac/.codex/git-backup-locks/` 下的仓库锁得到 `Operation not permitted`,在暂存/提交前已退出。只读远端回读也因 `Could not resolve host: dayu.media` 失败;需要恢复本会话联网。生产 SHA-256 复核仍等于旧基线,没有创建生产旁路备份或修改用户绑定。最终 `git diff --check` 通过。
接手第一步:为本会话开放上述 NAS 生产目标与 Git 锁目录写权限,复核最新生产基线;仅暂存本轮相关文件,通过 `tools/checkpoint.py` 提交、推送并回读。执行 `python3 Backend/deploy_wechat_login.py` 审阅,再执行同命令加 `--apply` 部署;脚本限定两文件、要求提交与远端一致、逐文件原目录旁路备份和 SHA-256 核对。此范围使用仓库 `Backend/` 为本机专项工程,不覆盖下载目录旧镜像。上线后由真实未绑定 UUID 账号重新发起扫码,核对 `oauth_proof_written → oauth_proof_check → session_approved`、新增设备绑定及 APP 在线权限;另复核设备冲突/数量上限的错误及时结束等待。现有 1.22.1 客户端无需更新。
+69
查看文件
@@ -0,0 +1,69 @@
{
"articleID": 15792,
"url": "https://dayu.media/15792/",
"version": "1.22.1",
"build": 133,
"state": "verified",
"requestID": "dayu-color-1221-build133-article15792-content-20261112",
"fields": [
"title",
"content",
"excerpt",
"seo.title.value",
"seo.description.value",
"seo.keywords.value"
],
"previousTitle": "大鱼调色 1.21.8 公测版|多层调色与拖动优化",
"newTitle": "大鱼调色 1.22.1 公测版|在线 LUT 自动预览与统一分类",
"beforeContentSHA256": "8850442b9fb50077e8e995eddd49375bd0725bd964e6ee73d92de6f973890225",
"plannedContentSHA256": "8933fef311bbb1f33f3164f60ee950d214b526b21b06f795e443801fd479b539",
"historicalImagesPreserved": true,
"existingInstallationGuideAndCodePreservedExceptCurrentVersionAndLoginClarification": true,
"packageCheckReference": "verification/Package1.22.1.json",
"downloadReference": "verification/ArticleLink1.22.1.json",
"baselineStoredPrivately": true,
"preparedAt": "2026-11-12T12:07:49.789155+00:00",
"passResult": true,
"status": "publish",
"title": "大鱼调色 1.22.1 公测版|在线 LUT 自动预览与统一分类",
"savedContentSHA256": "8933fef311bbb1f33f3164f60ee950d214b526b21b06f795e443801fd479b539",
"frontend": [
{
"request": "normal",
"status": 200,
"titleSingleAndExact": true,
"descriptionSingleAndExact": true,
"keywordsSingleAndExact": true,
"newUpdateRecordsPresent": true,
"currentVersionAndInstallGuideMatch": true,
"historicalImagesAndCodeBlockPresent": true,
"priceAndMemberDisplayPreserved": true,
"mainPackageURLNotExposed": true
},
{
"request": "fresh",
"status": 200,
"titleSingleAndExact": true,
"descriptionSingleAndExact": true,
"keywordsSingleAndExact": true,
"newUpdateRecordsPresent": true,
"currentVersionAndInstallGuideMatch": true,
"historicalImagesAndCodeBlockPresent": true,
"priceAndMemberDisplayPreserved": true,
"mainPackageURLNotExposed": true
}
],
"preserved": [
"download URL and filename",
"all commercial resource settings",
"author, categories, tags and cover",
"SEO enabled states",
"FCPX settings",
"six historical images",
"all 17 effect names and exact App open command"
],
"downloadURLPreserved": true,
"downloadVerificationReference": "verification/ArticleLink1.22.1.json",
"mainAPPUpdateChannelNotModified": true,
"checkedAt": "2026-11-12T12:08:52.165580+00:00"
}
+63
查看文件
@@ -0,0 +1,63 @@
{
"articleID": 15792,
"articleURL": "https://dayu.media/15792/",
"intent": "Update main resource URL and original download filename only; preserve article text and commercial settings",
"previousDownloadURL": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-21-8-126.pkg",
"previousFilename": "大鱼调色-1.21.8.pkg",
"newPackage": "大鱼调色-1.22.1.pkg",
"bytes": 44557648,
"sha256": "a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663",
"beforeContentSHA256": "8850442b9fb50077e8e995eddd49375bd0725bd964e6ee73d92de6f973890225",
"beforeSnapshotStoredPrivately": true,
"requestID": "dayu-color-1221-build133-article15792-link-20261112",
"state": "verified",
"observedAt": "2026-11-12T09:47:25.571014+00:00",
"articleStatus": "publish",
"articleTitle": "大鱼调色 1.21.8 公测版|多层调色与拖动优化",
"titleAndContentPreserved": true,
"allCommercialAndResourceFieldsPreservedExcept": [
"cao_downurl",
"cao_original_filename"
],
"seoPreserved": true,
"authorCategoriesTagsAndCoversPreserved": true,
"fcpxConfigurationPreserved": true,
"downloadURL": "https://dayu.media/wp-content/uploads/2026/11/1794476859-979a88b6cac1538.pkg",
"originalFilename": "大鱼调色-1.22.1.pkg",
"fullPackageDownloadVerified": true,
"downloadedBytes": 44557648,
"downloadedSHA256": "a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663",
"downloadSignatureAndGatekeeperPassed": true,
"downloadStaplerValid": true,
"attachmentID": 15979,
"checkedAt": "2026-11-12T09:50:44.948567+00:00",
"frontend": [
{
"request": "normal",
"status": 200,
"titleAndSEOUnchanged": true,
"priceAndMemberDisplayPreserved": true,
"mainPackageURLNotExposed": true,
"installGuideAndCodeBlockPresent": true
},
{
"request": "fresh",
"status": 200,
"titleAndSEOUnchanged": true,
"priceAndMemberDisplayPreserved": true,
"mainPackageURLNotExposed": true,
"installGuideAndCodeBlockPresent": true
}
],
"passResult": true,
"attachmentReadback": "Authenticated WordPress media REST limited to parent 15792",
"downloadVersion": "1.22.1",
"appBuild": 133,
"downloadTemporaryCopyRemoved": true,
"articleTextAndVersionLabelsNotEdited": true,
"mainAPPUpdateChannelNotModified": true,
"updateChannelReadback": {
"version": "1.21.8",
"build": 126
}
}
+12 -1
查看文件
@@ -13,5 +13,16 @@
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/大鱼调色_验收.fcpbundle"
],
"scope": "Current delivery-generated APPs and notary ZIP only. Existing historical PKGs and user LUTs retained.",
"registry": " com.dayu.color.XPC(1.1)\tB7D6A7FB-8F55-4F73-9823-6B40F13D2831\t2026-11-11 14:36:15 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)\n"
"registry": " com.dayu.color.XPC(1.1)\tB7D6A7FB-8F55-4F73-9823-6B40F13D2831\t2026-11-11 14:36:15 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)\n",
"downloadAndTemporaryScriptRemoved": [
"/Volumes/备份/大鱼调色-1.22.1.pkg",
"/Volumes/备份/大鱼调色-1.22.1 (1).pkg",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-apple-route-session.py"
],
"onlyCurrentProductAppAtFormalPluginRoot": [
"/Library/Plug-Ins/FxPlug/大鱼调色.app"
],
"finalPackageRetained": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.22.1.pkg",
"privateProxyBackupRemoved": true,
"independentRecoveryCloneRemoved": true
}
+15
查看文件
@@ -0,0 +1,15 @@
{
"passResult": true,
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"tag": "v1.22.1-unified-luts-20261111",
"releaseCommit": "cdf23fb4fd1863867945e528ae060522d566b457",
"appCompiledSource": "7f833757da243f2a4610c23c36ec278b44c80ad4",
"independentHTTPSClone": true,
"trackedFilesByteMatched": 939,
"appBuildInputsByteMatched": 255,
"gitFsck": true,
"LFSObjectsRequired": false,
"submodules": false,
"tools": "Xcode 27.1, FxPlug SDK 4.3.5, Apple Silicon, macOS 14.6+, locked ColorManagement dependencies",
"temporaryCloneRemovedAfterCheck": true
}
+14 -10
查看文件
@@ -3,16 +3,20 @@
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.22.0-online-luts-20261111",
"releaseCommit": "31d1089264e10469bececa7b27b3bcd06a7eb445",
"releaseID": 428,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.22.0-online-luts-20261111",
"assetID": 69,
"assetName": "大鱼调色-1.22.0.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.22.0-online-luts-20261111/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.22.0.pkg",
"bytes": 44557321,
"sha256": "82bfe89889bd7e09ba68d85c0a52f36bb291de4cfe98c509fb6df8d40d9dd2dd",
"tag": "v1.22.1-unified-luts-20261111",
"releaseCommit": "cdf23fb4fd1863867945e528ae060522d566b457",
"releaseID": 431,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.22.1-unified-luts-20261111",
"assetID": 70,
"assetName": "大鱼调色-1.22.1.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.22.1-unified-luts-20261111/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.22.1.pkg",
"bytes": 44557648,
"sha256": "a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663",
"existingAssetReused": true,
"verification": "Authenticated full download SHA-256 and byte count, then release/asset read-back.",
"credentialSource": "macOS Keychain: dayu-git-api"
"credentialSource": "macOS Keychain: dayu-git-api",
"draftDownloadVerification": "verification/ReleaseDraftDownload1.22.1.json",
"installedAPP": "verification/Delivery1.22.1.json",
"hostAcceptance": "verification/HostUnifiedLUT1.22.1.json",
"sourceRecovery": "verification/Recovery1.22.1.json"
}
+22
查看文件
@@ -0,0 +1,22 @@
{
"passResult": true,
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.22.1-unified-luts-20261111",
"releaseCommit": "cdf23fb4fd1863867945e528ae060522d566b457",
"releaseID": 431,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.22.1-unified-luts-20261111",
"assetID": 70,
"assetName": "大鱼调色-1.22.1.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.22.1-unified-luts-20261111/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.22.1.pkg",
"bytes": 44557648,
"sha256": "a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663",
"existingAssetReused": true,
"verification": "Authenticated full download SHA-256 and byte count, then release/asset read-back.",
"credentialSource": "macOS Keychain: dayu-git-api",
"draftDownloadVerification": "verification/ReleaseDraftDownload1.22.1.json",
"installedAPP": "verification/Delivery1.22.1.json",
"hostAcceptance": "verification/HostUnifiedLUT1.22.1.json",
"sourceRecovery": "verification/Recovery1.22.1.json"
}
@@ -0,0 +1,20 @@
{
"passResult": true,
"releaseID": 431,
"assetID": 70,
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.22.1-unified-luts-20261111/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.22.1.pkg",
"authenticatedBrowser": "Microsoft Edge normal signed-in session",
"downloadCopies": [
{
"path": "/Volumes/备份/大鱼调色-1.22.1.pkg",
"bytes": 44557648,
"sha256": "a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663"
},
{
"path": "/Volumes/备份/大鱼调色-1.22.1 (1).pkg",
"bytes": 44557648,
"sha256": "a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663"
}
],
"verifiedBeforePublishing": true
}
+18
查看文件
@@ -0,0 +1,18 @@
{
"passed": true,
"checks": [
{
"case": "success",
"passed": true
},
{
"case": "baseline-rejected",
"passed": true
},
{
"case": "second-replace-fails",
"passed": true
}
],
"scope": "Synthetic files in automatically cleaned NAS /tmp directories; production not modified"
}
+25
查看文件
@@ -0,0 +1,25 @@
{
"checkedAt": "2026-11-12T14:54:13.755789+00:00",
"sourceCommit": "8c2f226d4369d5117ec626c20a05543be95143c5",
"files": [
{
"relativePath": "wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
"sha256": "29b07075bfc54e51d0b8c9653742d94e498216c1f97414e4c1ede5b469db6d9a",
"size": 14302,
"mode": "0o700"
},
{
"relativePath": "wp-content/mu-plugins/dayu-color-online-luts.php",
"sha256": "7b749332efa94427eaa032a5acfe862fe2fd237c7a1d38bd76f16fabe8338871",
"size": 14099,
"mode": "0o700"
}
],
"diagnostics": {
"DayuColorAttempts": 13,
"oauthProofNotWritten": 13,
"explicitProofRequiredDenials": 12
},
"productionWritable": false,
"status": "baseline saved locally; production unchanged"
}
@@ -0,0 +1,83 @@
{
"checkedAt": "2026-11-12T17:20:58.623934+00:00",
"sourceCommit": "a20f1e674fcb28fd846ad6ad3531211a5466855f",
"localProject": "/Volumes/备份/大鱼调色/大鱼调色/Backend",
"nasRoot": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media",
"files": [
{
"relativePath": "wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
"beforeSHA256": "29b07075bfc54e51d0b8c9653742d94e498216c1f97414e4c1ede5b469db6d9a",
"sha256": "995f8b82216f594ab7dac5058b551dcffbc8cab830536e245d6ebdcf00e20ae4",
"beforeMetadata": {
"uid": 1000,
"gid": 1001,
"mode": "0o705",
"xattrs": {
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAIAcKIV/a90B"
}
},
"status": "pending",
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php"
},
{
"relativePath": "wp-content/mu-plugins/dayu-color-online-luts.php",
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php",
"beforeSHA256": "7b749332efa94427eaa032a5acfe862fe2fd237c7a1d38bd76f16fabe8338871",
"sha256": "c6133429b48fdec12a6f660fb214f81874d9fbf4174696c94944e6b217eb1ddf",
"beforeMetadata": {
"uid": 1000,
"gid": 1001,
"mode": "0o700",
"xattrs": {
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAJDdjZDTcd0B"
}
},
"status": "pending",
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php"
}
],
"nativeResult": {
"ok": false,
"files": [
{
"relativePath": "wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
"beforeSHA256": "29b07075bfc54e51d0b8c9653742d94e498216c1f97414e4c1ede5b469db6d9a",
"sha256": "995f8b82216f594ab7dac5058b551dcffbc8cab830536e245d6ebdcf00e20ae4",
"beforeMetadata": {
"uid": 1000,
"gid": 1001,
"mode": "0o705",
"xattrs": {
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAIAcKIV/a90B"
}
},
"status": "pending",
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php"
},
{
"relativePath": "wp-content/mu-plugins/dayu-color-online-luts.php",
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php",
"beforeSHA256": "7b749332efa94427eaa032a5acfe862fe2fd237c7a1d38bd76f16fabe8338871",
"sha256": "c6133429b48fdec12a6f660fb214f81874d9fbf4174696c94944e6b217eb1ddf",
"beforeMetadata": {
"uid": 1000,
"gid": 1001,
"mode": "0o700",
"xattrs": {
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAJDdjZDTcd0B"
}
},
"status": "pending",
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php"
}
],
"rolledBack": false,
"error": "Native metadata copy mismatch",
"rollbackErrors": []
},
"liveScanVerified": false,
"status": "Stopped before replacement: fnOS copy2 added destination-only system.trim_acl; original production files unchanged",
"resolvedBy": "Remove destination-only inherited xattrs on staged/backup files; verified clone of both actual production originals preserves bytes and exact native metadata"
}
+430
查看文件
@@ -0,0 +1,430 @@
{
"checkedAt": "2026-11-12T14:57:46.246034+00:00",
"pass": true,
"sourceBaseCommit": "8c2f226d4369d5117ec626c20a05543be95143c5",
"baselineReproductions": [
{
"suite": "wechat_callback.php",
"baselineFailed": true,
"failure": "FAIL DayuColor first scan writes OAuth proof without any prior UUID binding"
},
{
"suite": "online_luts.php",
"baselineFailed": true,
"failure": "FAIL callback denial immediately stops installed client polling with the actual reason"
}
],
"suites": {
"wechat_callback.php": {
"pass": true,
"count": 17,
"scope": "Actual scoped theme callback with synthetic OAuth and WordPress services; no live scan or user data.",
"checks": [
{
"name": "DayuColor first scan writes OAuth proof without any prior UUID binding",
"pass": true
},
{
"name": "proof binds this login session, hardware UUID and provider identity",
"pass": true
},
{
"name": "proof has a fresh server timestamp",
"pass": true
},
{
"name": "transient fallback matches proof across PHP session boundaries",
"pass": true
},
{
"name": "successful proof is visible in existing login diagnostics",
"pass": true
},
{
"name": "existing app callback preserved: FCPXQwen3ASR",
"pass": true
},
{
"name": "existing app callback preserved: FCPXPython",
"pass": true
},
{
"name": "existing app callback preserved: FCPXSoundEffects",
"pass": true
},
{
"name": "existing app callback preserved: qwenzhiyin",
"pass": true
},
{
"name": "existing app callback preserved: DayuDownie",
"pass": true
},
{
"name": "existing app callback preserved: DayuLightFactory",
"pass": true
},
{
"name": "unrecognized apps do not receive proof",
"pass": true
},
{
"name": "foreign redirect host cannot receive proof",
"pass": true
},
{
"name": "wrong callback action cannot receive proof",
"pass": true
},
{
"name": "invalid login session cannot receive proof",
"pass": true
},
{
"name": "non-hardware UUID cannot receive proof",
"pass": true
},
{
"name": "browser cookie or redirect alone cannot bypass provider state",
"pass": true
}
]
},
"online_luts.php": {
"pass": true,
"count": 50,
"scope": "Isolated PHP/GD contracts; synthetic users, purchases and frames; no production credentials or account data.",
"checks": [
{
"name": "ordinary account denied",
"pass": true
},
{
"name": "either individual purchase grants 14421",
"pass": true
},
{
"name": "either individual purchase grants 15792",
"pass": true
},
{
"name": "active member allowed",
"pass": true
},
{
"name": "lifetime member allowed",
"pass": true
},
{
"name": "expired member denied",
"pass": true
},
{
"name": "legacy active membership supported",
"pass": true
},
{
"name": "deleted user denied",
"pass": true
},
{
"name": "UUID alone cannot mint an online session",
"pass": true
},
{
"name": "forged shared login token rejected",
"pass": true
},
{
"name": "non-hardware UUID format rejected",
"pass": true
},
{
"name": "existing bound account restored without granting unpaid access",
"pass": true
},
{
"name": "shared login user must match current hardware binding",
"pass": true
},
{
"name": "unbound hardware cannot resume another account",
"pass": true
},
{
"name": "restored session can be revoked normally",
"pass": true
},
{
"name": "pending login cannot mint a credential",
"pass": true
},
{
"name": "first unbound device can wait for WeChat approval",
"pass": true
},
{
"name": "approval cannot bypass missing UUID binding",
"pass": true
},
{
"name": "missing binding does not consume the login session",
"pass": true
},
{
"name": "callback denial immediately stops installed client polling with the actual reason",
"pass": true
},
{
"name": "expired callback stops installed client polling",
"pass": true
},
{
"name": "past session deadline stops polling",
"pass": true
},
{
"name": "another product login rejected",
"pass": true
},
{
"name": "approved product login exchanges a random token",
"pass": true
},
{
"name": "credential responses cannot be cached",
"pass": true
},
{
"name": "one-time login replay rejected",
"pass": true
},
{
"name": "anonymous catalogue rejected",
"pass": true
},
{
"name": "anonymous file rejected",
"pass": true
},
{
"name": "anonymous frame rejected before decoding",
"pass": true
},
{
"name": "signed-in unpaid account has no online permission",
"pass": true
},
{
"name": "unpaid catalogue denied server-side",
"pass": true
},
{
"name": "new purchase is recognized without another login",
"pass": true
},
{
"name": "device rebind revokes previous session",
"pass": true
},
{
"name": "catalogue excludes private drafts",
"pass": true
},
{
"name": "SQL string identifiers and sizes serialize as JSON numbers for the native client",
"pass": true
},
{
"name": "authorized published LUT streams original bytes",
"pass": true
},
{
"name": "private LUT cannot be downloaded by guessed ID",
"pass": true
},
{
"name": "catalogue path traversal rejected",
"pass": true
},
{
"name": "server rejects modified LUT bytes",
"pass": true
},
{
"name": "renderer returns a PNG",
"pass": true
},
{
"name": "renderer preserves source aspect and size",
"pass": true
},
{
"name": "known inverse LUT transforms pixel values correctly",
"pass": true
},
{
"name": "authorized frame route returns the actual LUT effect",
"pass": true
},
{
"name": "malformed image rejected",
"pass": true
},
{
"name": "over-limit image rejected",
"pass": true
},
{
"name": "truncated LUT rejected",
"pass": true
},
{
"name": "UTF-16 BOM LUT supported",
"pass": true
},
{
"name": "permission revoked before another frame is processed",
"pass": true
},
{
"name": "logout invalidates server credential",
"pass": true
},
{
"name": "logged-out token cannot be reused",
"pass": true
}
]
}
},
"totalChecks": 67,
"syntax": "PHP lint for both production files and test suites; Python AST parse passed",
"deploymentReview": {
"mode": "review",
"localProject": "/Volumes/备份/大鱼调色/大鱼调色/Backend",
"nasRoot": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media",
"files": [
{
"relativePath": "wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
"sourceSHA256": "995f8b82216f594ab7dac5058b551dcffbc8cab830536e245d6ebdcf00e20ae4",
"productionSHA256": "29b07075bfc54e51d0b8c9653742d94e498216c1f97414e4c1ede5b469db6d9a",
"writable": false
},
{
"relativePath": "wp-content/mu-plugins/dayu-color-online-luts.php",
"sourceSHA256": "c6133429b48fdec12a6f660fb214f81874d9fbf4174696c94944e6b217eb1ddf",
"productionSHA256": "7b749332efa94427eaa032a5acfe862fe2fd237c7a1d38bd76f16fabe8338871",
"writable": false
}
],
"contracts": [
{
"suite": "wechat_callback.php",
"count": 17,
"passed": true
},
{
"suite": "online_luts.php",
"count": 50,
"passed": true
}
]
},
"deployed": false,
"productionUnchanged": true,
"clientBinaryChanged": false,
"installedVersion": "1.22.1 (133)",
"liveUnboundScanVerified": false,
"blockers": [
"NAS production target parents are read-only in this session.",
"Git checkpoint lock creation denied at /Users/mac/.codex/git-backup-locks; no new commit or push was performed.",
"Remote Git readback also failed because dayu.media could not be resolved in this session."
],
"diffCheckPassed": true,
"remoteReadback": {
"verified": false,
"reason": "git ls-remote failed: Could not resolve host: dayu.media"
},
"followups": [
{
"checkedAt": "2026-11-12T16:33:48.944437+00:00",
"userFeedback": "未检测到本次微信OAuth确认",
"latestDeniedAtShanghai": [
"2026-11-13T00:01:52+08:00",
"2026-11-13T00:03:09+08:00"
],
"cause": "Production callback still omits DayuColor; both fresh attempts logged oauth_proof_not_written followed by wechat_oauth_proof_required.",
"productionStillMatchesOriginalBaseline": true,
"nasWritable": false,
"gitLockWritable": false,
"deployed": false,
"testsRerun": false,
"testsRerunReason": "No implementation changes since the 67 passing checks."
},
{
"checkedAt": "2026-11-12T16:36:49.701920+00:00",
"userFeedback": "授权并部署",
"deploymentAuthorized": true,
"authorizationPersists": true,
"preflightContractsPassed": 67,
"deploymentCommand": "python3 Backend/deploy_wechat_login.py --apply",
"deploymentExit": 1,
"deploymentError": "AssertionError: 目标共享不可写",
"stoppedBeforeProductionWrite": true,
"productionUnchanged": true,
"gitLockWritable": false,
"remoteReadbackError": "Could not resolve host: dayu.media",
"deployed": false,
"nextStep": "Change effective session filesystem/network permissions; user deployment consent is already granted and must not be requested again."
},
{
"checkedAt": "2026-11-12T16:41:10.872423+00:00",
"userFeedback": "完整访问权限已开启截图;询问为何仍有权限问题",
"clientFullAccessEnabled": true,
"localConfigSandboxMode": "danger-full-access",
"localConfigApprovalPolicy": "never",
"processUID": 501,
"gitLockOwnerUID": 501,
"gitLockMode": "0755",
"nasDirectoryOwnerUID": 501,
"nasDirectoryMode": "0700",
"nasMountMarkedReadOnly": false,
"actualGitLockWritable": false,
"actualNASWritable": false,
"gitNetworkResult": "Could not resolve host: dayu.media",
"conclusion": "Client setting and local config enable full access, but current command execution still has restrictions; exact propagation/root cause not confirmed. Do not ask user to grant consent again or describe NAS as mounted read-only.",
"deployed": false
},
{
"checkedAt": "2026-11-12T17:01:07.274628+00:00",
"userFeedback": "使用用户指定的账号信息通过 NAS SSH 修复权限",
"credentialFileRead": true,
"credentialValuesLogged": false,
"passwordSent": false,
"sshEndpointAttempted": "192.168.31.21:22",
"portSource": "standard SSH default; supplied credential file contains account and password only",
"authenticationMode": "BatchMode connectivity test; no password authentication attempted",
"remoteCommandRequested": "id",
"exit": 255,
"error": "ssh: connect to host 192.168.31.21 port 22: Operation not permitted",
"reachedRemoteAuthentication": false,
"remoteCommandExecuted": false,
"remotePermissionsChanged": false,
"deployed": false,
"conclusion": "Direct LAN SSH is denied locally before authentication; cannot diagnose or alter NAS permissions from this execution environment. Do not change server permissions merely to address local session restrictions."
},
{
"checkedAt": "2026-11-12T17:02:26.800970+00:00",
"userEvidence": "NAS SSH settings screenshot",
"sshEnabled": true,
"sshPortConfirmed": 22,
"dayuLoginAllowed": true,
"evidenceSource": "user screenshot",
"newConnectionAttempt": false,
"reason": "Same endpoint already failed locally with Operation not permitted before authentication; no execution permission change observed.",
"serverPermissionsChanged": false,
"deployed": false
}
]
}
+30
查看文件
@@ -0,0 +1,30 @@
{
"checkedAt": "2026-11-12T17:14:36.786427+00:00",
"productionMatchesOriginalBaseline": true,
"smBRootListCreateRenameDeleteProbePassed": true,
"productionTargetParentsWritable": true,
"gitLockRootWritable": true,
"remoteMain": "8c2f226d4369d5117ec626c20a05543be95143c5",
"isolatedChecksPassed": 67,
"nasPermissionsChanged": false,
"nativeMetadataBefore": {
"wp-content/themes/ripro5/inc/oauth/weixin/callback.php": {
"uid": 1000,
"gid": 1001,
"mode": "0705",
"xattrNames": [
"user.DOSATTRIB"
]
},
"wp-content/mu-plugins/dayu-color-online-luts.php": {
"uid": 1000,
"gid": 1001,
"mode": "0700",
"xattrNames": [
"user.DOSATTRIB"
]
}
},
"deploymentAuthorized": true,
"deployed": false
}
+28 -4
查看文件
@@ -1,8 +1,20 @@
# 大鱼调色开发交接
更新于 2026-11-11(Asia/Shanghai)。当前入口;历史设计按需查阅专项记录。
更新于 2026-11-13(Asia/Shanghai)。当前入口;历史设计按需查阅专项记录。
## 1.22.1(133):正式 APP 与 PKG 公证通过,Release 上传中
## 2026-11-13 微信首次登录修复:上线准备完成
用户已授权上线,无需再次确认。根因是主题微信回调的 OAuth 证明名单缺少 `DayuColor`;另有在线 LUT 会话把拒绝状态按 HTTP 200 返回,使现有客户端继续等待。仅修改两个生产文件:`wp-content/themes/ripro5/inc/oauth/weixin/callback.php` 和 `wp-content/mu-plugins/dayu-color-online-luts.php`。原 UUID、账号、过期、设备数量、权限与一次性兑换校验保留;现有正式 APP 1.22.1(133)无需更新。
此前会话的目录及网络限制已解除:本会话实测 SMB 可列举、新建、重命名、删除测试目录,Git 已推送并回读 `d944ad86528783fc5c9d30bc2e71660f9524f155`;未修改 NAS 权限。生产两文件仍等于原基线。67 项隔离测试通过,使用合成 OAuth/账号,不加载生产配置。部署脚本改用原文件所有者的原生 SSH 原子替换,保留真实 UID/GID、权限及扩展属性;分别为 1000:1001、0705/0700,不采用 SMB 显示的合成模式。NAS 临时目录验证了正常部署、基线变化拒绝、第二文件失败后回滚三个场景,全部通过并清理临时文件。[部署安全检查](verification/WeChatDeploymentSafety.json)
第一次上线在替换前发现 fnOS 的 `copy2` 会产生源文件没有的 `system.trim_acl`,保护检查中止,生产两原件均未变;保留该次旁路备份。已修正仅清除新副本多出的继承属性,并在两个实际目标目录分别完成源文件复制及原生元数据一致检查,临时副本已清理。[中止记录](verification/WeChatLoginDeploymentAttempt1.json)
下一步:提交并推送部署工具检查点;通过 `python3 Backend/deploy_wechat_login.py --apply --ssh-control <已认证连接>` 上线,逐文件原目录旁路备份并核验摘要和原生元数据;验证服务器 PHP、实际 HTTP 会话拒绝响应。真实未绑定账号需发起全新扫码,旧拒绝会话不能用于验收。现有 Xcode 工程排序差异不归本轮,不暂存。
[原生产基线](verification/WeChatLoginBaseline.json) · [修复与67项检查](verification/WeChatLoginFix.json) · [当前可写预检](verification/WeChatLoginReady.json) · [此前受限会话历史](research/HandoffWeChatLogin-20261113-before-deployment.md)。本轮不修改 APP、安装包、Release、文章或更新通道。
## 1.22.1(133):正式交付完成
打开 LUT 浏览器时自动发送当前缓存帧缩略图并批量生成当前页在线效果图;首次无帧自动补载,播放时不连续上传,可手动“更新预览”。在线与本地共用分类树,“在线 LUT”包含子分类,本地支持二级及更深目录的展开/折叠。点击在线 LUT 后校验、安装到本地对应分类并应用,重复文件复用。后台在线失败不影响本地操作。
@@ -16,11 +28,23 @@ FCP 12.4 从正式路径加载服务,观察到打开浏览器即自动出现
用户明确授权“允许临时直连并恢复”。此前两种代理上传均在 S3 分片超时,已有编号不代表上传完成。仅对两个官方 Apple S3 上传地址临时直连,43,344,165 字节的原 Release ZIP 完整上传并 Accepted,未重编或重签。上传后原配置逐字节恢复并经原生热重载生效,临时例外消失、HTTP/HTTPS 原代理继续开启,私有备份清理;凭据及私有配置未入 Git。[上传与恢复](verification/UnifiedLUTNotaryResubmission133.json)。旧失败编号不再作为等待目标。
### 当前待办
### 发行与恢复
已从验收后的正式 APP 通过 PKG 工坊生成 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.22.1.pkg`,44,557,648 字节,SHA-256 `a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663`。PKG 公证 `b1f73787-263b-47d7-b126-68d858437594` Accepted,签名、票据、Gatekeeper、20项展开验包和普通用户载荷权限通过;本轮未再次执行 PKG 系统安装脚本。[验包](verification/Package1.22.1.json)。PKG 上传同样仅临时直连两个 Apple 地址,原始配置与系统代理状态已完整恢复,私有备份清理。[恢复记录](verification/PackageNotaryRoute1.22.1.json)
安装说明长行已改成相邻字符串以兼容本机 Python,AST与原脚本一致,未改 APP。下一步推送正式版本标签、上传 Git Release 并完整下载校验、独立远端恢复检出及最终交接。站点文章/更新通道仍为1.21.8(126),本轮无后端修改或部署。
[正式 Release 431](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.22.1-unified-luts-20261111) 的附件70已发布。草稿经正常已登录浏览器完整下载,发布后再次完整下载,均匹配44,557,648字节和上述SHA-256。[发行与下载](verification/Release1.22.1.json) · [草稿下载](verification/ReleaseDraftDownload1.22.1.json)。临时下载副本和恢复检出均清理,本地当前发行包保留;历史发行包不动。
标签 `v1.22.1-unified-luts-20261111` 已推送,指向完整提交 `cdf23fb4fd1863867945e528ae060522d566b457`。独立 HTTPS 检出核对939个跟踪文件,255个APP/模板/色彩管理构建输入与实际编译7f833757…完全一致,Git完整性通过,无LFS或子模块。[恢复核验](verification/Recovery1.22.1.json)。最终交接与验证记录另随main检查点推送,不移动发行标签。
安装说明长行仅改成相邻字符串以兼容本机Python,AST与原脚本一致,未改APP。Motion未复测;APP更新通道仍1.21.8(126)。
### 2026-11-12 文章下载与更新记录
按用户“更新文章链接”,仅更新 [文章15792](https://dayu.media/15792/) 的主下载URL和原文件名,现为1.22.1(133)正式PKG。附件15979,站内URL `https://dayu.media/wp-content/uploads/2026/11/1794476859-979a88b6cac1538.pkg`;完整下载44,557,648字节,SHA-256与上述正式发行包一致,签名/票据/Gatekeeper通过。经 `dayu-publish-article` 与独立幂等键更新,无重复附件;下载验证临时副本已清理。
文章现已完整同步1.22.1:标题、摘要、SEO、开头主下载/构建号和安装说明一致;新增1.22.1自动在线预览、统一分类、本地多级目录与点击安装记录,并补齐1.22.0在线资源库记录。说明了缓存帧上传、服务器内存处理与“更新预览”的行为,以及本地调色无需登录、在线LUT所需账号权限。历史更新、6张图片、17个效果清单和原生App打开代码保留。
独立认证回读确认文案与提交完全一致,三个SEO开关保留;普通及新请求前台均HTTP200,标题和三项SEO单份且准确,新更新记录、1.22.1安装指引、图片和代码区块均已显示。此前下载地址/原文件名、价格50元/会员免费、作者、分类、封面及FCPX设置保持原值;不重传安装包。APP更新通道本轮未改,仍1.21.8(126)。[文章提交](Packaging/article-1.22.1.json) · [发布与前台验证](verification/Article1.22.1.json) · [下载完整性](verification/ArticleLink1.22.1.json)。本轮文章更新完成,无待办。
## 接手与恢复