Init #3
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/anz!3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "init"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@claude where is my review???!!
Claude finished @navicore's task in 1m 23s —— View job
Code Review
src/cli/user.rschangessrc/server/authorize.rschangesSummary
This PR contains compilation fixes and a meaningful security improvement, but also includes two files that must not be committed.
🚨 Critical: Database WAL files committed
anz.db-shmandanz.db-walare SQLite Write-Ahead Logging auxiliary files — transient shared memory and journal files generated at runtime. They should never be in source control:These need to be removed from the PR and added to
.gitignore:Also note:
.gitignoreline 20 contains a strayEOF < /dev/null— a heredoc artifact that should be removed. Fix this →src/cli/user.rs— Potential UX regressionLines 52–58: The change splits
rpassword::prompt_password("Password: ")intoeprint!("Password: ")+rpassword::read_password().eprint!does not guarantee a stderr flush. On some systems, the prompt could be buffered and displayed after the terminal is already in no-echo mode, leaving the user staring at a blank prompt with no indication they should type.rpassword::prompt_passwordhandles this internally by flushing before disabling echo.Unless there's a specific reason for this split (e.g. test harness interference), reverting to
prompt_passwordis safer. If the split is intentional, add an explicit flush: Fix this →src/server/authorize.rs— Mostly positive.as_slice()additions (lines 97, 203, 269): These are correct API compatibility fixes.Sha256::digest()returns aGenericArray, and.as_slice()gives the expected&[u8]. No concerns.Explicit
askama::Errorannotations (lines 134, 322): These help the type inferencer and improve clarity. Fine.Redirect URL construction (lines 287–293): This is a genuine security improvement.
The new approach: validates
redirect_uriis a well-formed URL, correctly handles pre-existing query parameters, and delegates encoding to theurlcrate. Good change.One minor note: this code path is reached only after
redirect_urihas already passed the registered URI allowlist check (line 88/180), so themap_err(...Internal...)error should be unreachable in practice. Consider whether it should be adebug_assert!or just left as-is for defense in depth.Verdict
anz.db-shm/anz.db-walcommitted.gitignorehasEOF < /dev/nullartifact.as_slice()fixesaskama::ErrorannotationsDo not merge until the SQLite WAL files are removed from the commit history and
.gitignoreis updated to prevent re-adding them.