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

Invitations: an existing account gets a registration link, and unchecked input creates broken invitees

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

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

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

評価

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

調査の方向性

Start with settingspage::invite() in system/datatypes/settings.php around line 112, then read the member list logic around line 676 and the related user and mail functions. Trace the supplied reproduction cases for existing accounts, comma-separated addresses, and empty input. Done means invalid or existing-account addresses are handled safely, users are added once, and pending invitees display correctly.

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

説明

Impact: Low Level: Easy Type: Bug Value: Security Value: Users

settingspage::invite() (system/datatypes/settings.php:112) does not check what it gets:

  1. Address of an existing account. hypha_addUser() refuses the address (user exists), but the result is ignored; hypha_getUserByEmail() then returns the existing account and hypha_addUserRegistrationKey() gives that account a registration key. The invitation mail goes to the owner of the account with a settings/register/<key> link, through which the user name, password, e-mail and language of that account can be set. Any member can do this for any account, including an administrator's. Together with #425 (invitation keys from uniqid(), never expiring) this leaves a standing password-reset link on accounts that did not ask for one.
  2. No validation of the input. The field is split on , without trim() or filter_var(). [email protected], [email protected] stores the second address with a leading space; sendMail() then refuses it, but the invitee is kept. An empty field creates an invitee without an address.
  3. hypha_addUser() is called twice per address (lines 119 and 123); for an empty address the second call creates a second, empty user without key.
  4. The member list shows invitation pending only for rights == 'invite' (line 676), but invitees have rights="invitee", so an open invitation shows as a row with empty name columns.

Steps to reproduce. Log in as a member, settings → invite: (1) the administrator's address: the administrator account gets a key attribute and an invitation mail; (2) [email protected], [email protected]: the second invitee has email=" [email protected]"; (3) an empty field: two users without address are added.

Tested on PHP 8.2, 8.4 and 8.5 with a fictional test site (main, d97ab7b). Suggested direction: trim and validate each address, refuse addresses that already belong to an account (or only re-send for invitees), call hypha_addUser() once and compare with 'invitee' in the member list.

主要言語
JavaScript
スター
5
フォーク
9
平均マージ
18時間 7分
マージ済み PR(30日)
11

環境構築

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

はじめの一歩

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

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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