XML escaping problem in manager

2 views
Skip to first unread message

Nicolas Alvarez

unread,
Oct 19, 2009, 1:57:34 PM10/19/09
to synecdo...@googlegroups.com
<DerMeister> 18.10.2009 17:59:41|World Community Grid|[scrsave_debug]
ACTIVE_TASK::check_graphics_mode_ack(): got graphics ack
&lt;mode_hide_graphics/> for
CMD2_0114-UBC9.clustersOccur-2F1Z_B.clustersOccur_4_41214_43539_1, previous
mode &lt;mode_unsupported/>
<DerMeister> that "&lt;" doesn't look right there...
<Didactylos> what version?
<DerMeister> trunk, r1240
<Didactylos> is the display error in the manager (only)?
<DerMeister> Looks like it's the manager only. The client writes it
correctly to the console
<Didactylos> The manager xml handling is just broken.
<Didactylos> I think I may even have disabled part of it because it was so
incredibly inefficient.
<Didactylos> But I don't think that change affected the messages
<Didactylos> You could open an issue just to make sure this doesn't get
forgotten.
<Didactylos> Is it the same in simple and advanced views?
<DerMeister> Yes, it's the same in both views
<Didactylos> That part of "just escaping the opening angle bracket" looks
like DA's wonderful optimisation in the GUIRPC code.

About the actual problem: when I changed the client code to use iostreams,
I added XML escaping where there was none before. For example, in the
message contents when replying to a <get_messages/> GUIRPC. There used to
be no escaping there, so a reply would look like this:

<msg>
<project>World Community Grid</project>
<pri>1</pri>
<seqno>644</seqno>
<body>
[scrsave_debug] ACTIVE_TASK::check_graphics_mode_ack(): got graphics ack
<mode_hide_graphics/> for
CMD2_0114-UBC9.clustersOccur-2F1Z_B.clustersOccur_4_41214_43539_1, previous
mode <mode_unsupported/>
</body>
<time>1255965570</time>
</msg>

Which means there would be actual empty self-closed XML tags inside <body>.
Now the tags are escaped, but the manager doesn't unescape them.

I'm not sure what to do about it. If we make the manager (well, the rpc
library) unescape it, we still have a compatibility problem with third
party GUIs. If I make the client not escape it anymore (as it was before),
the client may generate invalid XML.


Nicolas Alvarez

unread,
Oct 21, 2009, 6:19:16 PM10/21/09
to synecdo...@googlegroups.com
Nicolas Alvarez wrote:
> I'm not sure what to do about it. If we make the manager (well, the rpc
> library) unescape it, we still have a compatibility problem with third
> party GUIs. If I make the client not escape it anymore (as it was before),
> the client may generate invalid XML.

I think I'll just make the client output the message body unescaped. We can
worry about invalid XML when we make a new and decent protocol from
scratch...


gui_rpc_server_ops.C.diff
Reply all
Reply to author
Forward
0 new messages