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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Story DSL ending with text without newline makes parser get stuck #333

Closed
vorburger opened this issue Apr 8, 2022 · 3 comments 路 Fixed by #339
Closed

Story DSL ending with text without newline makes parser get stuck #333

vorburger opened this issue Apr 8, 2022 · 3 comments 路 Fixed by #339

Comments

@vorburger
Copy link
Member

While testing the comment about how to reproduce #301 while reviewing #332, I found that adding "La Fin." at the end of dynamic-test.story WITHOUT a CR / LF (?), that makes the parser get "stuck" and loop infinitely somewhere - a DOS! 馃槇

@vorburger
Copy link
Member Author

In #332 @edewit also removed the following from StoryParserTest which we should add back when we fix this bug:

@Test public void blanks() throws SyntaxErrorException {
    Story story = getStoryParser().parse("   \n \r\n  ");
    assertThat(story.getActionsList(), hasSize(1));
}

@vorburger vorburger added High and removed Medium labels Apr 8, 2022
@vorburger
Copy link
Member Author

@edewit this is likey related to why you added \n to inline JS? That's perhaps a bigger problem than the EOF...

As-is now (with #332) it could be confusing how a .story gets "broken" if you forget the \n in a return "hello".

@edewit
Copy link
Member

edewit commented Apr 8, 2022

The fix for the empty line will fix this as well

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

Successfully merging a pull request may close this issue.

2 participants