#21 Error transfering strings with "\0"

closed-fixed
nobody
None
9
2001-06-22
2001-06-19
No

XMLRPC 0.86 here.

If you try to transfer a string with "\0" (ASCII=0)
inside, the string will be truncated.

Example:

Server:

import xmlrpc
s=xmlrpc.server()

def p(serv, src, uri, method, params):
print repr(params)
return 0

s.addMethods({"print":p})
s.bindAndListen(31323)
s.work()

Try to send different strings to that server. Try to
send strings with "\0" inside.

Discussion

  • Jesús Cea Avión

    • priority: 5 --> 9
    • summary: Error transfering strings with "\0" --> Error transfering strings with "\0"
     
  • Shilad Sen

    Shilad Sen - 2001-06-22
    • summary: Error transfering strings with "\0" --> Error transfering strings with "\0"
    • status: open --> closed-fixed
     
  • Shilad Sen

    Shilad Sen - 2001-06-22

    Logged In: YES
    user_id=184164

    I have made the fix in 0.8.7. If you are interested in
    making the patch before this is released, there is a
    one-line fix in rpcUtils.c, function unescapeString:
    res = PyString_FromString(newStr); /* there will be no
    nulls! */
    should be changed to:
    res = PyString_FromStringAndSize(newStr, tp-newStr);
    I was under the impression that NULL's weren't up to spec,
    but recent newsgroup discussion has made it clear that is
    not true.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks