-
Notifications
You must be signed in to change notification settings - Fork 94
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
Suppress xml_parse warnings in XmlParser #116
Comments
Indeed, you might be onto something. The lib tries to avoid echoing any error - or warning - to stdout, even in presence of malformed input, because doing so is not a good idea in general (esp. wrt security), but in particular server-side, when echoing a bunch of html back to a client expecting xml-rpc will make debugging harder than returning a well-formed xmlrpc response with a more-or-less specific error message. The php manual page for In any case, I'll look into that - gotta decide if just silence warnings using Btw, what is the |
Fixed in version 4.0.3 |
Thanks for the explanation!
I used php-fuzzer to generate a value that would trigger a warning. |
Lovely! Finding unhandled corner cases via fuzz-testing is the best I could hope from library users. Are you fuzz-testing this library in order to verify the compliance of the Polyfill, or as a general due-diligence process unrelated to it? |
We are using the polyfill on a project and I wanted to check how well it resists to bogus XML. |
Good to know. Do not hesitate to let me know if you find any other anomaly. |
Btw, the details about known cases where there are differences between the two libs can be found looking in https://github.com/gggeek/polyfill-xmlrpc/blob/master/src/XmlRpc.php#L12 and in https://github.com/gggeek/polyfill-xmlrpc/blob/master/tests/APITest.php (look for |
If I understand correctly, the philosophy of this library is to not trigger warnings when XML is malformed, but instead use the logging mechanism.
However,
xml_parse
can trigger warnings when parsing some malformed strings.For example this code:
Will trigger this warning:
(I am using phpxmlrpc 4.10.2.)
The text was updated successfully, but these errors were encountered: