Repository navigation
Settings: copy a node's public key on plain HTTP; refusals say why - #117
Merged
Merged
Conversation
Copy public key used the Clipboard API, which exists only on HTTPS or localhost: on a node reached by its address it threw and did nothing, and the page showed only the fingerprint, so the fingerprint was pasted as DUG's key and refused (422) three times. The page now shows the whole public key to select; copying falls back to a selection where the API is missing (the API token's Copy too); the pin dialog says so when a fingerprint is pasted. change_refused audit records carry the reason the caller was told. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pinning DUG's key on OTK (8090) was refused with a 422 three times. The pasted text was DUG's fingerprint: Copy public key uses
navigator.clipboard, which browsers only offer on HTTPS or localhost. On a node reached by its address (http://192.168.8.223:8090) the button threw and did nothing, and the page showed only the fingerprint, so that was all there was to copy.ed25519:line, select-all) above the fingerprint.lib/clipboard.ts, tested). The API token's Copy had the same bug and uses it too.change_refusedrecords now carry thereasonthe caller was told (up to 300 characters). That's why the 422s didn't explain themselves in the logs; the auth audit test asserts it.Checked (dev server):
tsc -b, oxlint 0 errors, vitest 71/71,vite build; ot-server clippy-D warningsand tests 228/228.🤖 Generated with Claude Code