`isValidOrigin` cannot handle origin string with a port number

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
api

調査の方向性

Locate isValidOrigin and inspect its current url.Parse-based validation, then compare it with the linked Static CT API specification. Update the validation so an origin such as 127.0.0.1:8000 is accepted without a scheme while invalid origins remain rejected, and run the relevant existing tests if available.

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

説明

bug

Description

An origin string like '127.0.0.1:8000' should be a valid submission prefix according to the specification. However, isValidOrigin returns an error, because it cannot parse it as a schema-less URL:

Can't initialize CT HTTP Server: newLog(): origin "127.0.0.1:8000" is not valid: can't parse origin as an URL: parse "127.0.0.1:8000": first path segment in URL cannot contain colon

Adding a schema prefix of course results in an error as well.

I think using url.Parse is not the best option for this validation check because it cannot recognize a URL that includes a non-standard port if the URL does not have a scheme.

主要言語
Go
スター
41
フォーク
20
平均マージ
1日 21時間
マージ済み PR(30日)
26

環境構築

はじめの一歩

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

transparency-dev/tesseract のほかの issue

transparency-dev/tesseract の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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