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

Reject a news link that points back at the participant portal

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

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

評価

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

調査の方向性

SettingsController.ts:37-44 と SettingsController.ts:86-101 を読んで newsLink の検証をたどり、その後 SettingsController.test.ts を確認して既存の URL 検証テストを調べてください。オリジンが HOSTNAME と一致する newsLink のテストを追加し、リクエストが 422 を返すことを確認してください。issue によると、これは #937 に依存し、#973 とまとめられる可能性があるため、作業を始める前にそれらの状況を確認してください。

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

説明

backend enhancement

PATCH /settings accepts a newsLink on the participant portal's own host, and the admin gets no sign anything is wrong. updateSettings in SettingsController.ts:86-101 only runs sanitiseAndValidateUrl (SettingsController.ts:37-44), which checks the URL's shape, not where it points.

Before #986, a link like that made the portal load itself inside the news page (#861). Since #986, the participant portal treats it as no link (isUsableNewsLink in application/user-client/src/App.tsx), so News quietly drops out of the menu. The admin sees a successful save and has no way to tell why News is gone.

The backend already knows the portal's address. HOSTNAME is the participant portal URL used to build the register and reset-password links (ParticipantsController.ts:1006, UsersController.ts:405).

Proposal: reject a newsLink whose origin matches HOSTNAME's with a 422, the same way the existing URL check fails, and add a test in SettingsController.test.ts.

#937 and #973 both change sanitiseAndValidateUrl, so this is easiest once #937 lands, and could go in with #973.

Related: #861, #986, #598, #956.

主要言語
TypeScript
スター
4
フォーク
0
平均マージ
8時間 37分
マージ済み PR(30日)
3

環境構築

はじめの一歩

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

Garvan-Data-Science-Platform/ctrl のほかの issue

Garvan-Data-Science-Platform/ctrl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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