Repository navigation
fix: logins for every command, a password file, a payload bound, escaped text output, checks before connecting (v0.6.0) - #37
Merged
Conversation
…ped text output, checks before connecting (v0.6.0) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Implements the policy 1.6 review findings planned for v0.6.0 (minor).
Logins and credentials
edge,hostandappnow log in with--usernameand the password, aslistenandpublishdo. They connected without a login before.--password-fileandSPARKPLUGBCTL_PASSWORD_FILEtake the password from a file:--passwordis marked deprecated in help, and still works.--usernameis not sent, and a warning says so.--tls-*flag with a broker URL that connects without TLS prints a warning naming the flag and the scheme.xxxxx.Input bounds and validation
listenanddecodedecode payloads of at most--max-payloadbytes (default 16 MiB).listenreports a larger message on stderr and goes on.decodeexits 3, after reading one byte more than the bound.edgechecks--metricand--interval(must be more than 0) before it connects.publishrefuses topics with+or#, and--seqabove 255, before it connects.Output
--jsonis unchanged.listenanddecodewrite the metrics of a message one at a time instead of holding the whole output. JSON is the same byte for byte; text columns are aligned in blocks of 4096 lines.edgereports a DDEATH that could not be published as such.Docs
app --helpno longer mentions sending commands.make lintrow says it runs staticcheck.Exit codes that change (RELEASE.md,
### Breaking, with the way back)decodeabove the bound is 3.edge --intervalof 0 or less is 3, before connecting.publishwildcard topic or--seqabove 255 is 3, before connecting.Tests
--seq.TestEdgePrimaryHostdrives the publish interval through a seam instead of sleeping.Files:
cmd/{app,decode,edge,encode,exit,host,listen,publish,root,seams,version}.go, newcmd/conn.goandcmd/limits.go,internal/output/output.go, newinternal/output/escape.go, tests incmd/andinternal/output/, README.md, SECURITY.md, RELEASE.md, docs/exitcodes.md.🤖 Generated with Claude Code