Commit graph

2 commits

Author SHA1 Message Date
kryptomrx
b971d45e78 security: slug validation, path traversal protection, temp file cleanup
- SlugGuard.IsValid() rejects slugs with path traversal (../, //, uppercase)
- SlugGuard.ToSafePath() ensures sync writes stay within target directory
- PushCommand: skip files with invalid slugs before upload
- SyncCommand: validate server-returned slugs before writing to disk
- EditCommand/NewCommand: try/finally guarantees temp file deletion on crash
- NotesCache: set 600 permissions on cache file (metadata only, no token)
- NewCommand: remove dead Sha256 method (HashHelper already covers this)
2026-05-16 23:36:40 +02:00
kryptomrx
ae8a961cfd feat(commands): Dual-editor (nano/code), new note, parallel sync pull
- edit: terminal editor (nano/vim) by default, -c flag opens VS Code/Zed
- edit/new: ResolveTerminal() + ResolveCode() auto-detect editors on PATH
- new: create note from template, opens editor, confirms before push
- sync: pull notes from server with Parallel.ForEachAsync (8 concurrent)
- sync: hash diff - only download notes changed since last sync
- sync --dry-run: preview without writing, --all to force full download
- push: hash diff against server cache, Progress bar, --all flag
2026-05-16 23:20:59 +02:00