-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Parse xml rejection message (unescape) #1970
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1970 +/- ##
=======================================
Coverage 50.62% 50.62%
=======================================
Files 1065 1065
Lines 25371 25371
Branches 7144 7171 +27
=======================================
Hits 12844 12844
Misses 11378 11378
Partials 1149 1149
Continue to review full report at Codecov.
|
I am really not sure why this should be necessary. If this is necessary for the rejection/error case it must be necessary for the success case too. So some other thing is wrong here. |
Any by the way transform/xml.js is the old transform which shouldn't be used anymore. transform/fastxml.js should be the default now. IMHO transform/xml.js can be removed completely because it is unused. Any if it is still used this is a mistake and should be changed asap. |
Ok this is wrong. transform.js contains the common code for the old (xml2js) and the current (fastxml) transforms. But I am still not sure why the new escaping is necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code the escaping should already happen here https://github.com/greenbone/gsa/blob/master/gsa/src/gmp/http/transform/fastxml.js#L33 Could you double check why it is still necessary? Maybe we need to use some escaping libraries like he which is also used in the examples of fast-xml-parser?
It was necessary, because we didn't hand PARSER_OPTIONS to the parse() method for xml rejections. For the success case, we did that already and it worked fine. |
Use PARSER_OPTIONS in parse()
51f4b06
to
61d7bb3
Compare
😞 stupid mistake ... |
Indeed ;) I hardly found it, because it was such a small thing, but now everything should be fine. |
Thanks so much for taking care! |
Error messages like "Failed to find task 'foo'" are now handled correctly. This concerned xml gsad_response and action_result messages.
Checklist: