[bug] WorkRedact leaves international phone numbers with spaces unredacted

オープン 初心者向け
#2,980 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend, security

調査の方向性

LIFEOS/TOOLS/lib/WorkRedact.tsとredactWorkContent関数から始めて、フィルターのテストを探します。区切り文字のない国際電話番号がどのようにマッチするかを確認し、最小桁数を含め、スペース区切りとハイフン区切りの例をテストケースに追加します。これらのケースがマスキングされ、既存の米国の番号と区切り文字のない国際電話番号のケースも引き続き成功すれば完了です。

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

説明

What happened

WorkRedact leaves international phone numbers with spaces unredacted

Summary

LIFEOS/TOOLS/lib/WorkRedact.ts, redactWorkContent:

"+44 20 7946 0958"  -> unchanged
"+49 30 12345678"   -> unchanged
"+33 1 23 45 67 89" -> unchanged

The same numbers written without spaces (+<country code><digits>) are redacted, as are US shapes. Only those are caught. The common European ways of writing a number pass through to the work repo, which WorkSystem.md says the filter protects ("phone numbers ... are redacted before anything reaches the repo").

Suggested fix: accept spaces (and single hyphens) between digit groups after a +<country code>, with a minimum digit count, and add these cases to the filter's tests.

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

主要言語
TypeScript
スター
20k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

danielmiessler/LifeOS のほかの issue

danielmiessler/LifeOS の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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