andrew-lebedev opened a new issue, #399: URL: https://github.com/apache/casbin-Casbin.NET/issues/399
The [current](https://github.com/apache/casbin-Casbin.NET/blob/master/Casbin/Functions/BuiltInFunctions.cs#L232-L240) implementation of KeyMatch5 in Casbin.NET is incorrect and does not align with the [standard](https://github.com/apache/casbin/blob/1cde2646d10ad1190c0d784c3a1c0e1ace1b5bc9/util/builtin_operators_test.go#L485-L526) Casbin specification or documentation. It lacks the required logic to handle the format properly, causing policy matching to fail. ### Steps to Reproduce 1. Define a policy utilizing KeyMatch5. 2. Run a request that matches the standard KeyMatch5 behavior (e.g., matching specific path patterns with variables). 3. The function fails to evaluate the match correctly. ### Root Cause The current code in [BuiltInFunctions.cs (lines 232-240)](https://github.com/apache/casbin-Casbin.NET/blob/master/Casbin/Functions/BuiltInFunctions.cs#L232-L240) does not fully implement the required string parsing logic for KeyMatch5. ### Expected Behavior KeyMatch5 in Casbin.NET must pass all standard test cases defined in the main Apache Casbin repository. For reference, the complete and correct test suite that needs to be satisfied during the future implementation can be found here: [builtin_operators_test.go (lines 485-526)](https://github.com/apache/casbin/blob/1cde2646d10ad1190c0d784c3a1c0e1ace1b5bc9/util/builtin_operators_test.go#L485-L526). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
