Skip to content
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

chore: minor improvements to readability and updated code style #827

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

zepatrik
Copy link
Member

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@zepatrik zepatrik requested a review from aeneasr as a code owner October 14, 2024 12:26
Comment on lines -3 to -7
replace github.com/dgrijalva/jwt-go => github.com/form3tech-oss/jwt-go v3.2.1+incompatible

replace github.com/gobuffalo/packr => github.com/gobuffalo/packr v1.30.1

replace github.com/gorilla/sessions => github.com/gorilla/sessions v1.2.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were not (anymore) in the dependencies.

@@ -14,7 +14,7 @@ import (
func RandomBytes(n int) ([]byte, error) {
bytes := make([]byte, n)
if _, err := io.ReadFull(rand.Reader, bytes); err != nil {
return []byte{}, errorsx.WithStack(err)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong zero-value returned. Is this a breaking change? I'd argue not.

keys = append(keys, secrets)
keys = append(keys, rotatedSecrets...)

if len(keys) == 0 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me quite some time to figure out that the error check after the loop was just this...

@zepatrik zepatrik requested a review from alnr October 17, 2024 13:53
@zepatrik zepatrik merged commit 939bdbf into master Oct 21, 2024
8 checks passed
@zepatrik zepatrik deleted the chore/token/hmac-cleanup branch October 21, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants