Skip to content

fix: resolve potential runtime crashes and handle carriage returns in RFC metadata parsing#954

Open
MatrixNeoKozak wants to merge 1 commit into
aws:mainfrom
MatrixNeoKozak:fix/improvement-1782404996312
Open

fix: resolve potential runtime crashes and handle carriage returns in RFC metadata parsing#954
MatrixNeoKozak wants to merge 1 commit into
aws:mainfrom
MatrixNeoKozak:fix/improvement-1782404996312

Conversation

@MatrixNeoKozak

Copy link
Copy Markdown

Implements robust line-splitting and boundary checking in the RFC issue metadata parser. Previously, splitting issue bodies strictly on '\n' could leave carriage return characters ('\r') at the end of lines when processing CRLF-terminated text returned by the GitHub API. Furthermore, if the metadata table header '|PR|Champion|' was present but the body did not contain at least two subsequent lines, referencing lines[titleIndex + 2] would result in undefined and throw a TypeError on .split('|'). This fix replaces the single-character split with a \r?\n regular expression and adds thorough bounds and structural validation to ensure safe parsing of metadata columns.

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