mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 05:51:37 +08:00
The `discourse_owned?` method in `lib/plugin/instance.rb` was calling `.split` on `parsed_commit_url.path` without checking if the path could be nil. This caused a 500 error on `/admin/plugins` when any plugin had a commit URL that parsed successfully but returned a nil path (e.g., plugins without a git remote configured). Added a nil check for `parsed_commit_url.path` to gracefully handle this edge case and prevent the crash. Also added a test case to verify the method returns false when the parsed URL has a nil path. |
||
|---|---|---|
| .. | ||
| filter.rb | ||
| filter_manager.rb | ||
| instance.rb | ||
| metadata.rb | ||