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

[Q] What is a "marker row"? #269

Closed
juhp opened this issue Jun 27, 2022 · 5 comments
Closed

[Q] What is a "marker row"? #269

juhp opened this issue Jun 27, 2022 · 5 comments

Comments

@juhp
Copy link

juhp commented Jun 27, 2022

GHSA-mc3g-88wq-6f4x talks about "marker rows".
While I do see markers mentioned in the referenced code, searching for "markdown table marker row"
in general basically only hits on this advisory. Could you briefly explain what a "marker row" is?
I understand header row, delimiter row, and data row, but what is a marker row?

I am trying to work out a test to check that the mentioned CVE is indeed fixed, but since I don't understand "marker row", I am not sure what to test exactly, thanks.

@juhp
Copy link
Author

juhp commented Jun 27, 2022

Does it just mean a normal data row basically?
I just managed to reproduce without the fix for 2^16 columns.

@wooorm
Copy link

wooorm commented Jun 27, 2022

| a |
| - | <-- I presume this one. It doesn’t really have a name, so there are different words floating around
| b |

@juhp
Copy link
Author

juhp commented Jun 27, 2022

Okay - I think the spec calls that a delimiter row, but guess that makes sense.

@QuietMisdreavus
Copy link

Yes, what the security advisory calls a "marker row" is the same thing that the spec calls a "delimiter row". I imagine this term was used because that's how it's called in the source:

// Since scan_table_start was successful, we must have a marker row.
marker_row = row_from_string(self, parser,
input + cmark_parser_get_first_nonspace(parser),
len - cmark_parser_get_first_nonspace(parser));
// assert may be optimized out, don't rely on it for security boundaries
if (!marker_row) {
return parent_container;
}

@waldyrious
Copy link

Update: the code has now been updated to refer to these as "delimiter rows" as well — see #273.

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

No branches or pull requests

4 participants