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

Missing string sanitation before passing failure text to xmlbuilder #27

Open
bencon opened this issue Nov 21, 2019 · 0 comments
Open

Missing string sanitation before passing failure text to xmlbuilder #27

bencon opened this issue Nov 21, 2019 · 0 comments

Comments

@bencon
Copy link

bencon commented Nov 21, 2019

line 33 in lib/serialize.js:
failureElement.txt(formatFailure(a.diag));

is prone to passing unicode characters that xmlbuilder can't handle which can cause tap-xunit to throw an error such as:

node_modules\tap-xunit\node_modules\xmlbuilder\lib\XMLStringifier.js:149
15:21:40 throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index);
15:21:40 ^
15:21:40
15:21:40 Error: Invalid character (�) in string:

As a result, no test results are generated.

The following pull request fixes the issue:
Add missing string sanitation #26

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

1 participant