已开启
[缺陷]: FullImageUpdate接口增加ImageURI长度校验 #1039
xijie创建于  8月26日
xijie成员
8月26日 创建

【问题描述】

UpdateService.FullImageUpdate 接口存在以下问题:

  1. ImageURI 无长度校验:超长 URI(本地 /tmp 路径超过 255 字符、远程路径超过协议前缀 + 1004 字符)传入后会直接下发升级任务,可能引发后端异常。
  2. 使用远程 URI 且未传 TransferProtocol 时,长度校验逻辑对 nil 取长度,会抛原生 Lua 错误而非标准的 ActionParameterMissing 错误响应。

【修改方案】

  1. interface_config/redfish/plugins/orchestrator/update_service.lua:FullImageUpdate 增加 ImageURI 长度校验(本地 /tmp 路径上限 255 字符,远程路径上限 1004 字符 + 传输协议前缀);长度校验置于 TransferProtocol 必填校验之后,避免协议缺失时崩溃;顺带修正错误信息中的属性名拼写错误。
  2. interface_config/redfish/mapping_config/UpdateService/Actions/FullImageUpdate.json:ImageURI 属性增加 Length Validator(1~1012)。

【验证方案】

  • 修改片段通过 luac5.1 -p 语法检查。
  • 远程 URI 不传 TransferProtocol 时返回 ActionParameterMissing 而非内部错误。
  • 超长 ImageURI 返回 ActionParameterValueFormatError。
likedislike
openUBMC-robot
openUBMC-robot成员
8月26日 评论:

注意

此 Issue 需要负责人。 如果没有指派时, ZanthoxylumLeaf 是默认的负责人

likedislike
openUBMC-robotopenUBMC-robot成员
8月26日 将 ZanthoxylumLeaf 设为负责人
openUBMC-robotopenUBMC-robot成员
8月26日 添加了label:sig/sig-interface
openUBMC-robot
openUBMC-robot成员
8月26日 评论:

欢迎来到 openUBMC 社区

Hey @grlxw , 感谢你对社区的贡献.

机器人使用手册

有关指令的使用,可以点击 说明文档 或 论坛 查看详情。开发人员可以在每个PR或Issue下方评论特定指令来触发机器人任务。您可以自助配置此仓库的 PR 合并规则,更多详情,请参阅机器人自助配置使用手册。

联系指引

有疑问可以联系 SIG: sig-interface ,
维护者是: @DataSculptor, @WeliveWelove, @aaronlee, @huanghan ,
优秀贡献者是: @L_Ling, @PLUS_ONE, @yelvsub .

likedislike
openUBMC-robot
openUBMC-robot成员
8月26日 评论:

Issue 工作流介绍

社区的需求和缺陷的工作流状态处于纳管中。

类型 上个状态 下个状态 评论命令 谁可以操作
缺陷 待修复 修复中 /todo2fixing 仓库成员角色: Maintainer, Committer, Contributor, Owner
缺陷 修复中 待验收 /fixing2UAT 仓库成员角色: Maintainer, Committer, Contributor, Owner
缺陷 待验收 已修复 /UAT2done SIG组: sig-QA (maintainer,committer)
缺陷 待修复 已挂起 /todo2suspended 仓库成员角色: Maintainer, Committer, Contributor, Owner
缺陷 待修复 已拒绝 /todo2rejected 仓库成员角色: Maintainer, Committer, Contributor, Owner
likedislike
xijie成员
8月26日 评论:

/todo2fixing

likedislike
xijie成员
29 天前 评论:

/todo2fixing

likedislike
openUBMC-robot
openUBMC-robot成员
29 天前 评论:

Issue 工作流提示

您暂无Issue的工作流 待修复 更改为 修复中 的操作权限,请联系有权限的成员。

likedislike
lixiaoning成员
29 天前 评论:

/todo2fixing

likedislike
openUBMC-robotopenUBMC-robot成员
29 天前 issue状态由 待修复 改变为 修复中
Xxijie成员
29 天前 关联了pull request:feat: 更新rackmount到1.110.128,合入本地镜像列表去重与ImageURI长度校验修复
zhangbaocun成员
28 天前 评论:
/fixing2UAT
likedislike
openUBMC-robotopenUBMC-robot成员
28 天前 issue状态由 修复中 改变为 待验收