Merged
Conversation
399dc23 to
609ed7c
Compare
609ed7c to
bdc8881
Compare
e9c454a to
65e1609
Compare
muzzammilshahid
requested changes
Oct 7, 2025
cmd/wshd/main.go
Outdated
Comment on lines
299
to
309
| lines, err := keyStore.AuthorizedKeys() | ||
| if err != nil { | ||
| return fmt.Errorf("failed to get authorized keys: %w", err) | ||
| } | ||
|
|
||
| plaintext := strings.Join(lines, "\n") | ||
| if plaintext == "" { | ||
| return fmt.Errorf("no keys to sync") | ||
| } | ||
|
|
||
| callResponse := session.Call(procedureSyncKeys).Args(plaintext).Do() |
Member
There was a problem hiding this comment.
Suggested change
| lines, err := keyStore.AuthorizedKeys() | |
| if err != nil { | |
| return fmt.Errorf("failed to get authorized keys: %w", err) | |
| } | |
| plaintext := strings.Join(lines, "\n") | |
| if plaintext == "" { | |
| return fmt.Errorf("no keys to sync") | |
| } | |
| callResponse := session.Call(procedureSyncKeys).Args(plaintext).Do() | |
| lines, err := keyStore.AuthorizedKeys() | |
| if err != nil { | |
| return fmt.Errorf("failed to get authorized keys: %w", err) | |
| } | |
| callResponse := session.Call(procedureSyncKeys).Args(lines).Do() |
We should send keys as list instead of converting it to string
cmd/wshd/main.go
Outdated
Comment on lines
319
to
322
| keys, err := inv.ArgBytes(0) | ||
| if err != nil { | ||
| return xconn.NewInvocationError("wamp.error.invalid_argument", err.Error()) | ||
| } |
7bbcf1d to
7d0cd14
Compare
muzzammilshahid
requested changes
Oct 7, 2025
cmd/wshd/main.go
Outdated
Comment on lines
314
to
316
| argList, ok := inv.Args()[0].([]interface{}) | ||
| if !ok { | ||
| return xconn.NewInvocationError("wamp.error.invalid_argument", "expected list of keys") |
Member
There was a problem hiding this comment.
Suggested change
| argList, ok := inv.Args()[0].([]interface{}) | |
| if !ok { | |
| return xconn.NewInvocationError("wamp.error.invalid_argument", "expected list of keys") | |
| argList, err := inv.ArgList(0) | |
| if err != nil { | |
| return xconn.NewInvocationError("wamp.error.invalid_argument", err.Error()) |
7d0cd14 to
f76c4c6
Compare
muzzammilshahid
approved these changes
Oct 8, 2025
Member
muzzammilshahid
left a comment
There was a problem hiding this comment.
Looks good! Please make sure to test it once more before merging and in followup, please add a way to specify the realm in wsh.
cmd/wshd/main.go
Outdated
| log.Fatal(err) | ||
| } | ||
|
|
||
| fmt.Println(sess.Details().Realm()) |
Member
There was a problem hiding this comment.
Suggested change
| fmt.Println(sess.Details().Realm()) |
Member
Author
There was a problem hiding this comment.
The changes have already been tested, and as we discussed, the realm option will be handled in a separate PR, so we don’t need to include it here.
f76c4c6 to
cf8b17b
Compare
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.
No description provided.