casbin / Casbin.NET

An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
https://casbin.org
Apache License 2.0
1.16k stars 111 forks source link

fix: Accidental cache read via key construction #330

Closed Tanyuu closed 1 year ago

Tanyuu commented 1 year ago

Since the key was created without adding a separator, it was possible to have illegitimate access to the cache by way of collocation. This is now fixed with reference to the go language version. However, in order to solve this problem at all, I think it should be explicitly mentioned in the documentation that fields should not contain '$'; or the separator should be replaced with a hash value (string hash) associated with the field.

casbin-bot commented 1 year ago

@sagilio please review