Skip to content

Security review Round 2: fixes + PR #7 bug fix#8

Merged
sohamM97 merged 3 commits intomainfrom
sec-review
Feb 16, 2026
Merged

Security review Round 2: fixes + PR #7 bug fix#8
sohamM97 merged 3 commits intomainfrom
sec-review

Conversation

@sohamM97
Copy link
Owner

Summary

  • MED-6: Brain dump dialog: maxLength: 25000 total, per-line truncation to 500 chars
  • LOW-4: Pre-import .db.bak backup before overwriting existing database
  • LOW-9: Gradle warns when key.properties missing (debug signing fallback)
  • LOW-10: firstWhere with orElse in deleteTask/completeTask/skipTask
  • LOW-12: URL text field maxLength: 2048
  • LOW-13: normalizeUrl validates host contains a dot (rejects garbage input like "hello world")
  • PR Code review Round 3: state sync fixes in undo flows #7 bug fix: Today's 5 "Done today" undo now passes restoreTo to preserve historical lastWorkedAt
  • Includes docs/SECURITY_REVIEW.md Round 2 findings

Deferred to v1.1: HIGH-1 (file_picker CVE), MED-5 (R8/ProGuard), LOW-11 (share_plus)

Test plan

  • All 293 tests pass (flutter test)
  • Linux build succeeds (flutter build linux)
  • Manual: paste long text into brain dump, verify truncation
  • Manual: type garbage into URL field, verify rejection
  • Manual: "Done today" → Undo in Today's 5, verify lastWorkedAt preserved
  • Wait for Codex PR review before merging

🤖 Generated with Claude Code

Soham Marik and others added 2 commits February 16, 2026 19:22
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Security fixes:
- MED-6: Brain dump dialog: maxLength 25000, per-line truncation to 500 chars
- LOW-4: Pre-import backup (.db.bak) before overwriting existing database
- LOW-9: Gradle warns when key.properties missing (debug signing fallback)
- LOW-10: firstWhere with orElse in deleteTask/completeTask/skipTask
- LOW-12: URL text field maxLength 2048
- LOW-13: normalizeUrl validates host contains a dot (rejects garbage input)

Bug fix (from PR #7 review comment):
- Today's 5 "Done today" undo now passes restoreTo to preserve
  historical lastWorkedAt instead of erasing it to NULL

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a811ae2f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return trimmed;
final normalized = trimmed.contains('://') ? trimmed : 'https://$trimmed';
final uri = Uri.tryParse(normalized);
if (uri == null || !uri.host.contains('.')) return null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject invalid URLs without clearing existing link

normalizeUrl now returns null for malformed non-empty input (for example, "https://" or "hello world"), but showEditUrlDialog treats null as “remove URL” and calls onUpdateUrl(null) on save/submit (leaf_task_detail.dart), so a user editing an existing link can silently delete it just by entering an invalid URL instead of getting a validation error. This is a behavior regression introduced by the new host.contains('.') guard.

Useful? React with 👍 / 👎.

…g link

normalizeUrl returning null for non-empty invalid input (e.g. "hello world")
was treated as "remove URL". Now distinguishes empty input (intentional
removal) from invalid input (shows error snackbar).

Fixes Codex review comment on PR #8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sohamM97 sohamM97 merged commit 526f193 into main Feb 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant