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

Settings: fatal errors on an unknown user or a non-numeric digest interval; members get a menu editor that does not save

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

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

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

評価

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

調査の方向性

Start with the reported paths in settings.php (lines 60, 304 and 791) and base.php (lines 480 and 485); trace the user lookups and digest interval handling, then check how the menu editor registers and saves commands. Reproduce an unknown-user request and a non-numeric interval on a local test site. Done means these cases return a useful message and form, and members do not see a menu save action that cannot save.

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

説明

Component: User interface Impact: Low Level: Easy Type: Bug Value: Users

A few settings requests end in a fatal error (500, empty page) instead of a message, and one screen offers a save that does nothing. All need a logged-in user; none loses data, because the lock on hypha.xml is released without saving.

Request Who Result
settings/user/<unknown name> administrator Call to a member function getAttribute() on false, settings.php:60
settings → project settings with a non-numeric value for days, hours or minutes of the digest interval administrator TypeError: Unsupported operand types: string * int, settings.php:304
command settingsRemind with an unknown user id administrator getAttribute() on false, settings.php:791
command settingsAdmin with an unknown user id administrator setAttribute() on false, base.php:485
command settingsSaveAccount for a user name that no longer exists (for example after a rename in another tab) administrator setAttribute() on false, base.php:480
settings/menu member the menu editor with a save button; saveMenu() only saves for administrators, so the change is silently dropped

The member list also offers a restore button with the command settingsRestore for users with rights="none", but no callback is registered for that command (and no code sets none).

Steps to reproduce. As administrator open settings/user/niemand, or enter x as the number of days of the digest interval and save. Result: 500 and the error above in the log. Expected: a message (unknown user, invalid number) and the form again.

Tested on PHP 8.2, 8.4 and 8.5 with a fictional test site (main, d97ab7b). Suggested direction: check the result of hypha_getUserByName()/hypha_getUserById() before use, cast or validate the interval fields, and only show the menu editor (or its save button) to administrators.

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

環境構築

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

はじめの一歩

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

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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