Open
Conversation
LT1ページなどでButtonコンポーネントのsizeプロパティを使用していたが、Buttonコンポーネント側で定義されておらず型エラーが発生していたため、sizeプロパティ(sm, md, lg)を追加して修正。
…mepage into feat/event-lp-lt1 # Conflicts: # src/Components/ui/Button.tsx
応募ボタンをdiscord参加ボタンに統合し、導線整理
…avoid 404 after auth redirect
応募ボタンをdiscord参加ボタンに統合し、導線整理
|
@MikanNigata is attempting to deploy a commit to the sora81dev Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
LT1関連API/画面で、全角文字や不可視文字を使ったメンション・URL回避が可能だった問題を修正しました。
あわせて、改行差分由来のマージ競合を減らすためのリポジトリ設定を追加しました。
背景
@の禁止判定が半角前提だったため、@(全角)などで回避される可能性がありました。また、Discord送信時の文字列無害化が一部フィールドで不十分でした。
変更内容
api/_lib/validation.ts入力値を
NFKC正規化してから検証するよう変更不可視文字(zero-width等)を除去して検証
ドット類似文字(
。.など)を.に寄せてURL検知src/Pages/LT1Register.tsxAPI側と同等の正規化・検証ロジックを反映(フロントでも早期ブロック)
api/_lib/discord.ts(新規)Discord Webhook URL検証を共通化
Discord送信前サニタイズを共通化
@系文字(半角/全角)と<@...>,<#...>参照を無害化api/lt1/submit.ts送信フィールドを共通サニタイズ経由に統一
共通Webhook検証を使用
api/lt1/vote.ts送信文字列を共通サニタイズ経由に統一
presenter.idも無害化対象に変更共通Webhook検証を使用
api/lt1/presenter-cancel.ts送信文字列を共通サニタイズ経由に統一
presenter.idも無害化対象に変更共通Webhook検証を使用
.gitattributes追加.editorconfig追加改行・文字コードルールを明示して差分ぶれを抑制
期待効果
動作確認
npx tsc -bが成功すること@everyone/﹫everyoneがブロックされることh\u200bttps://example.com/example。comがURLとして検知されること<#123456789012345678>が禁止または無害化されること影響範囲