sharkbound / WebsiteCommand

MIT License
2 stars 14 forks source link

URL with = in it threw an error and prevented the plugin from loading #3

Closed itsTEOTWAWKI closed 7 years ago

itsTEOTWAWKI commented 7 years ago

When adding /donate with this plugin, I received the error below, using this URL: https://hosthavoc.com/billing/index.php?m=public_pay&hash_id=31Y8ZWYGBdQr

I used Bitly to shorten the URL and eliminate the = (which appears to be the issue cited in the error) and the plugin functions normally. I would prefer to use the actual link as it is more trustworthy than a shortened link that leaves the true destination a mystery until you click it.

[12/5/2016 6:09:57 AM] [Info] Loading WebsiteCommand
[12/5/2016 6:09:57 AM] [Error] An error occured while executing rocket [load, website]: System.Exception: Failed to deserialize XMLFileAsset: Plugins/WebsiteCommand/WebsiteCommand.configuration.xml ---> System.Xml.XmlException: expected ';' (3B) but found '=' (3D)  Line 8, position 73.
  at Mono.Xml2.XmlTextReader.Expect (Int32 expected) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadEntityReference (Boolean ignoreEntityReferences) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadReference (Boolean ignoreEntityReferences) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlReader.ReadElementString () [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadPrimitiveValue (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers (System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList, Boolean readByOrder) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadListElement (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, System.Object list, Boolean canCreateInstance) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers (System.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList, Boolean readByOrder) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Rocket.Core.Assets.XMLFileAsset`1[WebsiteCommand.WebsiteConfig].Load (Rocket.API.AssetLoaded`1 callback) [0x00000] in <filename unknown>:0 
  at Rocket.Core.Plugins.RocketPlugin`1[RocketPluginConfiguration].LoadPlugin () [0x00000] in <filename unknown>:0 
  at Rocket.Unturned.Commands.CommandRocket.Execute (IRocketPlayer caller, System.String[] command) [0x00000] in <filename unknown>:0 
  at Rocket.Core.Commands.RocketCommandManager+RegisteredRocketCommand.Execute (IRocketPlayer caller, System.String[] command) [0x00000] in <filename unknown>:0 
  at Rocket.Core.Commands.RocketCommandManager.Execute (IRocketPlayer player, System.String command) [0x00000] in <filename unknown>:0 
sharkbound commented 7 years ago

https://hosthavoc.com/billing/index.php?m=public_pay&#38;hash_id&#61;31Y8ZWYGBdQr

try that link, i replaced the & and = with the xml escape charater equiviant (got the codes for the escape charaters from here https://www.dvteclipse.com/documentation/svlinter/How_to_use_special_characters_in_XML.3F.html#gsc.tab=0)

itsTEOTWAWKI commented 7 years ago

Looks like escaping the URL did the trick! I should have thought of that myself :)