internal/outpost: fix incorrect usage of golang SHA API#14279
internal/outpost: fix incorrect usage of golang SHA API#14279authentik-db-cooper wants to merge 2 commits intogoauthentik:mainfrom
Conversation
✅ Deploy Preview for authentik-storybook canceled.
|
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14279 +/- ##
==========================================
- Coverage 92.70% 92.52% -0.19%
==========================================
Files 809 809
Lines 41533 41533
==========================================
- Hits 38504 38428 -76
- Misses 3029 3105 +76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| h := sha256.Sum256([]byte(*p.ClientId)) | ||
| bs := string(h[:]) |
There was a problem hiding this comment.
Does this break existing sessions? Or is the resulting hash the same?
There was a problem hiding this comment.
🤷♂️ .. the resulting hash is different... see: https://go.dev/play/p/vSW0U3Hq4qk
There was a problem hiding this comment.
it does change the name of the cookie as with the previous invocation we were basically not hashing the value at all @rissson
Signed-off-by: Jens L. <jens@beryju.org>
Details
Move away from 512 and 256 SHA hashes in golang and use checksums.
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make website)