Settings: fatal errors on an unknown user or a non-numeric digest interval; members get a menu editor that does not save
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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 の本文から書いたものです。
説明
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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PlanBCode/hypha のほかの issue
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Type: Bug Value: Coders
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
PlanBCode/hypha#586 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
PlanBCode/hypha の issue をすべて見る
似ている issue
-
enhancement good first issue hacktoberfest help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
BinaryBaconLabs/todo-app#18 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
44-x-y bug :beetle:
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
electron/electron#55528 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
react/react-native#59699 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100