SharesUpdatedListener doesn't restore the home setup listener state on errors
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
調査の方向性
apps/files_sharing/lib/Listener/SharesUpdatedListener.phpを読み、特に71行目と137行目付近のリスナー状態の変更を確認し、SharesUpdatedListenerを対象とするテストを調べてください。コールバックが例外をスローしたときに状態がどうなるかを確認し、その後、関連するテストを実行してください。エラー後に以前のUserHomeSetupListenerの状態が復元され、そのケースをテストでカバーできたら完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug description
SharesUpdatedListener::handle() disables the UserHomeSetupListener while it updates shares and restores the old state at the end:
https://github.com/nextcloud/server/blob/3a68340a6c806a18cdd0d9667a3b9ec5f096b135/apps/files_sharing/lib/Listener/SharesUpdatedListener.php#L71
https://github.com/nextcloud/server/blob/3a68340a6c806a18cdd0d9667a3b9ec5f096b135/apps/files_sharing/lib/Listener/SharesUpdatedListener.php#L137
The restore is not in a finally, so if one of the callbacks throws (as in #67014), the home setup listener stays disabled for the rest of the request and pending share refreshes aren't run on later home folder setups in that request.
Steps to reproduce
Found by code reading.
- Trigger a share update (e.g. add a user to a group with shares) where a share target validation listener throws.
- Later file system setups in the same request skip the share refresh.
Expected behavior
The old state is restored in a finally block, covered by a test.
Nextcloud version
master
- 主要言語
- PHP
- スター
- 37.7k
- フォーク
- 5.4k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 585
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/server のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: tags good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: federation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: files feature: previews and thumbnails
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: dashboard
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
nextcloud/server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
nhrrob/nhrrob-secure#35 ·
-
area/tests type/bug when/soon
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信