Skip to content

reject new line characters in obj writer object and group names#295

Open
digi-scrypt wants to merge 1 commit into
apache:masterfrom
digi-scrypt:objwriter-name-newline-check
Open

reject new line characters in obj writer object and group names#295
digi-scrypt wants to merge 1 commit into
apache:masterfrom
digi-scrypt:objwriter-name-newline-check

Conversation

@digi-scrypt

Copy link
Copy Markdown

writeObjectName and writeGroupName write the name straight onto the o/g line, so a name with a \r or \n breaks out of that line and the rest is read back as separate OBJ statements (injected vertices/faces, or an mtllib pulling in an arbitrary material file). TextStlWriter.startSolid already guards its solid name against new lines; this adds the same check to the two ObjWriter name methods so the writer can't emit a name that re-parses as geometry. What happens if the name comes from user-supplied metadata is the case I had in mind here.

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