修正在线目录SQL数字序列化,覆盖真实原生网格加载

这个提交包含在:
mac 于 2026-11-11 19:55:13 +08:00 提交
1 父节点 8ef576b73d
当前提交 188553a613
6 个文件已更改
+24 -7

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

+2 -1
查看文件
@@ -27,7 +27,7 @@ class DB {
public $prefix='test_';
function prepare($sql,...$args){if(count($args)===1&&is_array($args[0]))$args=$args[0];return array($sql,$args);}
function get_var($q){global $bound;$sql=is_array($q)?$q[0]:$q;if(strpos($sql,'app_login_records')!==false)return $bound;if(strpos($sql,'COUNT(')!==false)return 1;return null;}
function get_results($q,$mode=null){global $rows;return array_map(function($r){return (array)$r;},array_values(array_filter($rows,function($r){return $r->status==='published';})));}
function get_results($q,$mode=null){global $rows;return array_map(function($r){$row=(array)$r;$row['id']=(string)$row['id'];$row['file_size']=(string)$row['file_size'];return $row;},array_values(array_filter($rows,function($r){return $r->status==='published';})));}
function get_col($q){return array('测试分类');} function esc_like($s){return addcslashes($s,'_%\\');}
function get_row($q){global $rows;$id=$q[1][0];$row=$rows[$id]??null;return $row&&$row->status==='published'&&$row->material_type==='lut'?$row:null;}
}
@@ -76,6 +76,7 @@ $path=$root.'/materials/test.cube';file_put_contents($path,$cube);
$rows[1]=(object)array('id'=>1,'title'=>'测试 LUT','category'=>'测试分类','file_size'=>strlen($cube),'checksum'=>hash('sha256',$cube),'material_type'=>'lut','status'=>'published','relative_path'=>'test.cube');
$rows[2]=clone $rows[1];$rows[2]->id=2;$rows[2]->status='draft';
check(count(body(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)))['items'])===1,'catalogue excludes private drafts');
$serialized=body(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)))['items'][0];check(is_int($serialized['id'])&&is_int($serialized['file_size']),'SQL string identifiers and sizes serialize as JSON numbers for the native client');
check(body(Dayu_Color_Online_LUTs::download(new Request(array('id'=>1),$token))) instanceof Dayu_Color_LUT_Binary,'authorized published LUT streams original bytes');
check(denied(Dayu_Color_Online_LUTs::download(new Request(array('id'=>2),$token)),404),'private LUT cannot be downloaded by guessed ID');
$rows[1]->relative_path='../outside.cube';file_put_contents($root.'/outside.cube',$cube);
@@ -142,7 +142,7 @@ final class Dayu_Color_Online_LUTs {
$total=intval($wpdb->get_var($values ? $wpdb->prepare($count, $values) : $count));
$rows=$wpdb->get_results($wpdb->prepare("SELECT id,title,category,file_size,checksum FROM {$table} WHERE {$where} ORDER BY title ASC,id ASC LIMIT %d OFFSET %d", array_merge($values, array($limit,($page-1)*$limit))), ARRAY_A);
$categories=$wpdb->get_col("SELECT DISTINCT category FROM {$table} WHERE material_type='lut' AND status='published' AND category<>'' ORDER BY category ASC");
foreach ((array)$rows as &$row) { $row['id']=intval($row['id']); $row['file_size']=intval($row['file_size']); } unset($row);
$rows=(array)$rows; foreach ($rows as &$row) { $row['id']=intval($row['id']); $row['file_size']=intval($row['file_size']); } unset($row);
return self::response(array('items'=>(array)$rows, 'categories'=>array_values((array)$categories), 'page'=>$page, 'total'=>$total, 'per_page'=>$limit));
}
private static function material($id) {
+5 -1
查看文件
@@ -1,6 +1,6 @@
{
"pass": true,
"count": 43,
"count": 44,
"scope": "Isolated PHP\/GD contracts; synthetic users, purchases and frames; no production credentials or account data.",
"checks": [
{
@@ -115,6 +115,10 @@
"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
+5 -4
查看文件
@@ -1,8 +1,9 @@
{
"sourceCommit": "0631e8b6c3aa6ef1cbcdb919d1267d9beeea7632",
"sourceCommit": "d979f8958caf36cc7b97ea838960c69f7fbb4d91",
"independentHTTPSClone": true,
"verifiedBuildInputFiles": 259,
"verifiedBuildInputFiles": 254,
"committedProjectBaselineMatches": true,
"version": "1.22.0",
"build": "130",
"scope": "Final application, templates and colour-management build inputs; existing unrelated project-reference ordering retained in the original checkout."
"build": "131",
"scope": "Actual application, template and colour-management inputs match independent checkout. Existing unrelated project-reference ordering remains uncommitted in the working tree."
}
+9
查看文件
@@ -0,0 +1,9 @@
{
"passResult": true,
"pagesVerified": 21,
"uniquePublishedLUTs": 1233,
"categoryCount": 17,
"categoryFilterVerified": true,
"titleSearchVerified": true,
"scope": "Authorized production catalogue only; no account identifiers, tokens or media retained."
}
+2
查看文件
@@ -19,3 +19,5 @@
- 后端:`Backend/` 为源码备份,本机专项工程 `/Users/mac/Downloads/dayumedia/dayu-color-beta`;NAS 仅生产部署,不在其上编译。生产相对路径与校验见专项记录及 `Backend/deploy_online_luts.py`。
- 继续测试时先在主 APP 自动识别硬件绑定账号,未绑定时微信登录,再在插件切换“在线 LUT”;手动预览当前帧后核对真实目录、下载和云端图像,不能把未登录界面验收视为已授权链路验收。
- [恢复说明](RECOVERY.md) · [此前版本交接归档](research/HandoffHistory-20261111-before-online-release.md)。凭据、私钥和账号令牌留在钥匙串,不进入仓库。
131 已公证安装,主 APP 自动识别、退出和刷新恢复通过;FCP 共享登录与 1,233 总数正常。真实宿主发现目录 SQL 字符串被原生类型校验过滤,正在修正服务端编号/大小序列化并补充合约后继续验收。