zalando / go-keyring

Cross-platform keyring interface for Go
MIT License
881 stars 86 forks source link

Limit set size #86

Closed fiws closed 1 year ago

fiws commented 2 years ago

Using Set with too much data leads to errors and unknown behaviour on macos and windows.

This PR limits the passable data on those platforms to known limits.

I also raised the max input on macos by switching to base64 for encoding. It uses a new prefix and also checks for the old one, so it should be backwards compatible.

This fixes #84

Also note that on macos the current behaviour actually interprets the input data as another command after a limit is reached. This could be a security vulnerability but is probably mitigated by the hex encoding.

mikkeloscar commented 1 year ago

:+1:

demonCoder95 commented 1 year ago

👍