openfga / api

Protocol Buffers used by OpenFGA
Apache License 2.0
18 stars 10 forks source link

fix: quantifiers in regexes #6

Closed miparnisari closed 2 years ago

miparnisari commented 2 years ago

From Slack:

Writing/checking against our github tuples is now throwing and invalid regex error:

rpc error: code = InvalidArgument desc = invalid CheckRequest.TupleKey: embedded message failed validation | caused by: invalid TupleKey.Object: value does not match regex pattern \"^[^\\\\s]{,256}$\"

But it’s triggering for checks as simple as:

curl -s -X POST http://localhost:8080/stores/$STORE_ID/check -d '{ "tuple_key": { "user": "anne", "relation": "maintainer", "object": "repo:a" } }'

repo:a should be a valid object