SimpleServer/SimpleServer — Issue #203: Bug: xmlPCDATA change not converting <argument> properly
Author: bryanburke
Created: 2011-12-03 00:40:49+00:00
State: open

Discovered this by total accident while trying to see what "xmlInlineAttributes" and "xmlPCDATA" actually do to config.xml.

When "xmlPCDATA" is changed back and forth, the tags are not converted properly, causing the server not to be able to check command permissions for commands that use tags. This is the stack trace given in the console:

Exception in thread "PlayerStream-player" java.lang.NullPointerException
at java.lang.String.startsWith(Unknown Source)
at java.lang.String.startsWith(Unknown Source)
at simpleserver.config.xml.ArgumentStorage.permission(Unknown Source)
at simpleserver.config.xml.CommandConfig.allow(Unknown Source)
at simpleserver.config.xml.Config.getCommandPermission(Unknown Source)
at simpleserver.Player.parseCommand(Unknown Source)
at simpleserver.stream.StreamTunnel.handlePacket(Unknown Source)
at simpleserver.stream.StreamTunnel.access$300(Unknown Source)
at simpleserver.stream.StreamTunnel$Tunneler.run(Unknown Source)

And the result:

[SimpleServer] java.net.SocketException: Software caused connection abort: socket write error
[SimpleServer] ServerStream error handling traffic for 127.0.0.1 (20)
[SimpleServer] Socket Closed: 127.0.0.1

This is what the tags get converted to:

The easiest way to reproduce this issue is to do the following:
1) Start the server with the default config.xml
2) Change "xmlPCDATA" to false
3) Reload server configuration
4) Log on as a privileged user
5) Attempt to change the world time ("/time day")