-
-
Notifications
You must be signed in to change notification settings - Fork 466
fix: #965 #970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: #965 #970
Conversation
WalkthroughSSH known host fingerprints support is added to the SFTP client. A new optional field stores known host fingerprints in the request model, initialized from settings with error handling. This fingerprint data is then passed to the SSH client during connection setup. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lib/data/model/sftp/req.dart (1)
22-26: Consider logging initialization failures for better observability.The broad exception catch silently swallows all errors when loading known host fingerprints. While the fallback to
nullis safe, logging the failure would help diagnose configuration issues, type mismatches, or store access problems during development and debugging.Consider applying this diff to improve observability:
try { knownHostFingerprints = Map<String, String>.from(Stores.setting.sshKnownHostFingerprints.get()); - } catch (_) { + } catch (e) { + Loggers.app.warning('Failed to load SSH known host fingerprints: $e'); knownHostFingerprints = null; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
lib/data/model/sftp/req.dart(2 hunks)lib/data/model/sftp/worker.dart(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
lib/data/model/**/*.dart
📄 CodeRabbit inference engine (CLAUDE.md)
After modifying annotated model files, run: dart run build_runner build --delete-conflicting-outputs
Files:
lib/data/model/sftp/worker.dartlib/data/model/sftp/req.dart
lib/data/model/sftp/**/*.dart
📄 CodeRabbit inference engine (CLAUDE.md)
Place SFTP models under lib/data/model/sftp/
Files:
lib/data/model/sftp/worker.dartlib/data/model/sftp/req.dart
🧠 Learnings (2)
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Applies to lib/data/model/sftp/**/*.dart : Place SFTP models under lib/data/model/sftp/
Applied to files:
lib/data/model/sftp/worker.dartlib/data/model/sftp/req.dart
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Applies to lib/data/model/ssh/**/*.dart : Place SSH models under lib/data/model/ssh/
Applied to files:
lib/data/model/sftp/worker.dartlib/data/model/sftp/req.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: check
🔇 Additional comments (2)
lib/data/model/sftp/worker.dart (1)
68-68: LGTM! Known host fingerprints correctly passed to SSH client.The changes consistently pass the known host fingerprints to
genClientin both download and upload operations, enabling SSH known host verification.Also applies to: 125-125
lib/data/model/sftp/req.dart (1)
11-11: LGTM! Field declaration is appropriate.The optional
knownHostFingerprintsfield correctly models SSH known host fingerprint data with an appropriate type.
|
Thanks |
修复了 #965 的问题
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.