Malformed revision manifests cause server errors
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading the existing manifest validation used by the revision file's Source tab, then trace the manifest consumers named in the issue across the project pages, file detail pages, upload operations, and REST API. Check how each consumer handles malformed stored data and how operations avoid changes when validation fails. Done means affected pages show a meaningful error without manifest-derived information, and dependent operations are refused without changes.
索引モデルが issue の本文から書いたものです。
説明
Plugin Version
v0.1.0
NetBox Version
v4.7.6
Python Version
3.12
Steps to Reproduce
- Create an upload-backed Script Project and upload a Script.
- Once the revision is active, overwrite its manifest using
nbshell:from netbox_scripts.models import ScriptProjectRevision ScriptProjectRevision.objects.filter(pk=<revision_id>).update(manifest=[None]) - Open any of the following pages or attempt to upload another Script:
- Script Project's Script Files tab
- Script Project's Revision Files tab
- Script File detail page
- Revision's Files tab
- Revision file's File tab
The last three pages are affected by the changes introduced in #224.
Expected Behavior
The affected pages remain usable and display a meaningful error, consistent with the revision file's Source tab. Information and links derived from an invalid manifest are not displayed.
Operations that depend on the manifest are refused without making changes.
Observed Behavior
The affected pages and operations fail with an HTTP 500 error, for example:
TypeError: 'NoneType' object is not subscriptable
Several consumers access the stored manifest without validating it first. This also affects the REST API.
The revision file's Source tab already handles this gracefully by displaying "The stored manifest cannot be trusted."
All manifest consumers should handle malformed manifests consistently by reusing the existing manifest validation mechanism.
The issue was identified during the implementation and review of #24 (#224).
- 主要言語
- Python
- スター
- 9
- フォーク
- 0
- 平均マージ
- 18時間 59分
- マージ済み PR(30日)
- 93
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
netbox-community/netbox-scripts のほかの issue
-
app: scripts Bucket: KTLO status: backlog type: housekeeping
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
netbox-community/netbox-scripts#281 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts Bucket: Improve complexity: low status: backlog type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
netbox-community/netbox-scripts#244 ·
メンテナーはふだん 1 日以内に返信
-
Correct the documentation of a Project's current revision対応中かも @pheus が今日担当しました。 オープンapp: scripts Bucket: KTLO status: accepted type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
netbox-community/netbox-scripts#233 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts complexity: medium status: backlog type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
netbox-community/netbox-scripts#229 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts status: backlog type: housekeeping
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
netbox-community/netbox-scripts#228 ·
メンテナーはふだん 1 日以内に返信
netbox-community/netbox-scripts の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
plone/plone.observability#114 ·
メンテナーはふだん 1 日以内に返信
-
area:docs type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jejjohnson/gauss_flows#246 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openvax/varcode#824 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
netbox status: needs triage type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
netbox-community/netbox#23868 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
emeryberger/CSrankings#15757 ·
メンテナーはふだん 9 日以内に返信