Repository navigation
fix: passkey 文案 #1936
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
Merged
+5
−2
Merged
fix: passkey 文案 #1936
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
🧩 Analysis chain
LGTM! Origins defaulting logic aligns with frontend guidance.
The logic correctly defaults
OriginstoServerAddresswhen empty or when set to the literal string"[]". This matches the updated frontend text stating "为空则默认使用服务器地址" (defaults to server address when empty).Verify that
ServerAddressis properly validated elsewhere to ensure it contains the protocol (https://) as required by the WebAuthn spec and indicated in the UI text. Run this script to check howServerAddressis initialized and validated:🏁 Script executed:
Length of output: 2869
Enforce HTTPS scheme for ServerAddress
Add validation when setting
ServerAddress(e.g., in model/option.go at the “ServerAddress” case) or before deriving the RPID (passkey.go:35-40) to reject or normalize any value that doesn’t start with “https://”, ensuring origins always comply with WebAuthn’s HTTPS requirement.🤖 Prompt for AI Agents