Skip to content
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

[Bug] parse length limit exceeded on versions >= 10.15.0 #726

Closed
ashishkeshan opened this issue Jul 24, 2024 · 2 comments
Closed

[Bug] parse length limit exceeded on versions >= 10.15.0 #726

ashishkeshan opened this issue Jul 24, 2024 · 2 comments
Labels

Comments

@ashishkeshan
Copy link

Hello! I noticed a bug with liquidjs when trying to upgrade from 10.14.0 -> 10.15.0. One of my CI tests has started failing with an AssertionError: parse length limit exceeded. I know that the file I'm parsing is definitely under the parse length limit, so I believe there is some sort of bug introduced by the new optionality to set a parse limit.

Here is a test repo where I have been able to reproduce the bug: https://github.com/ashishkeshan/liquidjs-render-bug

If someone could take a look at the repo and help me debug the issue, I would greatly appreciate it!

@jg-rp
Copy link
Contributor

jg-rp commented Jul 24, 2024

The error can be reproduced by passing an object instead of a string to liquid.parse().

import { Liquid } from "liquidjs";
const liquid = new Liquid();
liquid.parse({});
// AssertionError: parse length limit exceeded

In your test repo, for some iterations, toLint[key] is not a string.

@ashishkeshan
Copy link
Author

Thanks for the help! Looks like that was the fix I needed for my project. I'll still keep this open because I was not receiving an exception in earlier versions of LiquidJS, so I think something about error handling changed in the library.

@harttle harttle added the bug label Jul 25, 2024
github-actions bot pushed a commit that referenced this issue Jul 25, 2024
## [10.16.1](v10.16.0...v10.16.1) (2024-07-25)

### Bug Fixes

* parser throws on non-string input, [#726](#726) ([21a8223](21a8223))
@harttle harttle closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants