Skip to content

Conversation

SyedM-dev
Copy link

@SyedM-dev SyedM-dev commented Oct 15, 2024

Update the regex validation for user, relation, and object under CheckRequestTupleKey.

Updated regular expressions used for user, relation and object under CheckRequestTupleKey in the following manner:

  • user: ^(?=.{2,512}$)(?:[a-z_-]+:(?:[a-zA-Z0-9_/#-]+|\*))$
  • relation: ^[a-z]{1,50}$
  • object: ^(?=.{2,256}$)(?:[a-z_-]+:(?:[a-zA-Z0-9_/-]+|\*))$

Description

I tried to follow the docs for this project to ensure the regex matches, if there is a mistake or edge case please correct me. This is also my first code-based PR so please correct me if i did not understand the issue properly.

References

This PR is to fix the problem mentioned in this issue #188

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected
    • I'm sorry but I do not understand how and where I am meant to add tests for this.

Update the regex validation for user, relation, and object under CheckRequestTupleKey.
@SyedM-dev SyedM-dev requested a review from a team as a code owner October 15, 2024 16:04
Copy link

linux-foundation-easycla bot commented Oct 15, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant