-
-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document validation infinite loop #796
Comments
Submitted a PR with the fix: #797. |
@fenollp , can you please confirm the problem and assis? |
fenollp
pushed a commit
that referenced
this issue
Jun 7, 2023
wrong-user
pushed a commit
to wrong-user/kin-openapi
that referenced
this issue
Jun 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
We found out that in some cases, the Validate() method enters an infinite loop when validating a valid API document.
For example:
https://github.com/APIs-guru/openapi-directory/blob/51fed63e3e6bce022cedba44ce28863bd712040c/APIs/presalytics.io/ooxml/0.1.0/openapi.yaml
This happens because the "stack" slice isn't handled correctly in the validate receiver of "*Schema":
func (schema *Schema) validate(ctx context.Context, stack []*Schema) error
While the slice is being resliced during its lifecycle in the recursion, we do not store the resliced result and use the original slice instead.
NOTE: In order to load this spec, we had to set the "CircularReferenceCounter" to 20.
The text was updated successfully, but these errors were encountered: