files_external occ commands crash with InvalidArgumentException for SMB mounts without credentials
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
apps/files_external/lib/Command/StorageAuthBase.php の createStorage() 周辺と関連する SMB バックエンドのコードを読み、認証情報がない場合の処理を追ってください。InvalidArgumentException の要求された処理とユニットテストを追加し、その後、該当するテストを実行してください。認証情報なしで SMB をマウントしたとき、生の例外ではなく「Username and/or password required」とコマンドに表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug description
StorageAuthBase::createStorage() (used by files_external:notify and files_external:verify) only catches InsufficientDataForMeaningfulAnswerException and StorageNotAvailableException around manipulateStorageConfig():
The SMB backend throws an InvalidArgumentException when no user or password is available:
So for an SMB mount using login credentials (or without stored credentials) run without -u/-p, occ shows a raw exception instead of the intended "Username and/or password required" message (see the first log in #59519).
Steps to reproduce
Found by code reading.
- Create an SMB mount with "Log-in credentials, save in session".
- Run
occ files_external:notify <mount_id>without-u/-p. - An
InvalidArgumentException: user or password is not setis printed.
Expected behavior
The command prints "Username and/or password required". Fix: also catch \InvalidArgumentException in the backend manipulateStorageConfig() block of StorageAuthBase::createStorage() and set $noAuth = true, with a unit test.
Nextcloud version
master
- 主要言語
- PHP
- スター
- 37.6k
- フォーク
- 5.4k
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 605
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/server のほかの issue
-
Document lexicon.default.userconfig and lexicon.default.userconfig.enforced in config.sample.phpオープンenhancement feature: settings good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug feature: previews and thumbnails performance 🚀
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug feature: TaskProcessing good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
"Forwarded for headers" setup check trusts a client-sent Remote-Addr header and ignores CIDR proxiesオープンbug feature: settings
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug feature: occ
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
nextcloud/server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
nextcloud/integration_openai#480 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
a11y
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
omeka/plugin-Contribution#84 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
recca0120/vscode-phpunit#620 ·
メンテナーはふだん 1 日以内に返信
-
Validation rule generation for recursive Data objects is unbounded (O(payload depth))対応中かも @irfanm96 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
spatie/laravel-data#1226 ·