Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

safe identifier characters should include all Unicode alphanumerics

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

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

評価

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

調査の方向性

identifier.go の onlyAlphanumericsOrHyphenPattern から始め、issue の Unicode 文字クラスを提案されているスコープとして使用します。既存の identifier のバリデーション動作を確認し、変更する前に指摘されているセキュリティ上の懸念を検討します。安全な identifier が Unicode の文字と数字を受け入れつつ、ハイフンとアンダースコアのサポートを維持できれば完了です。

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

説明

The documentation for safe identifiers says "alphanumeric" characters are allowed, but the implementation supports only ASCII letters and numbers. Unless there are security issues with Unicode characters, they should be supported.

Motivation: documentation sites that want to use language identifiers as (part of) fragments for easy navigation, e.g. https://pkg.go.dev.

The change I'm suggesting would be from

var onlyAlphanumericsOrHyphenPattern = regexp.MustCompile(`^[-_a-zA-Z0-9]*$`)

(https://github.com/google/safehtml/blob/v0.0.2/identifier.go#L49)
to

var onlyAlphanumericsOrHyphenPattern = regexp.MustCompile(`^[-_\pL\pN]*$`)
主要言語
Go
スター
380
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

google/safehtml のほかの issue

google/safehtml の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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