storage: compare upload types by media type and accept a per-caller allowlist

オープン
#348 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
backend

調査の方向性

Start by reading the upload service implementation, especially WithAllowedUploadTypes, ValidMediaType, and NewService, to trace how MIME types are checked and how inline safety is enforced. Then inspect the upload tests and add coverage for parameterized and case-varied media types plus a per-upload allowlist. Done means matching ignores case and parameters while preserving the submitted type, and caller allowlists receive the same inline-safety check.

索引モデルが issue の本文から書いたものです。

説明

WithAllowedUploadTypes compares the whole MIME string with its list, and ValidMediaType rejects parameters, so a type sent with parameters (text/html; charset=utf-8) can never match. A Service also has one allowlist for every caller.

A host that lets a trusted caller store a type its users may not has to build a second Service with no allowlist and check types itself. Options added later to the main Service then miss the second one.

Proposal: compare upload types by media type (case and parameters ignored; the type is still stored as sent), and let a caller pass an allowlist for one upload, subject to the same inline-safety check NewService applies to its own list.

主要言語
Go
スター
6
フォーク
8
平均マージ
21時間 36分
マージ済み PR(30日)
42

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenNSW/core のほかの issue

OpenNSW/core の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。