-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension Fails to start when variables contain special characters #81
Comments
Follow these directions here #43 (comment) Besides that, I'll look into how it's possible that the issue occurred. All non-ASCII characters are supposed to be stored properly escaped. |
Thanks. Work around has fixed the issue. I had been playing around with the Encoding setting in Read file as giving it full server response (as dumped from the proxy via right click and Copy to File) > Global variable > Set value Response message after a previous Set Event Direction Response, i wasn't getting anything sent back (i was attempting to mock any jpg request with a default jpg from disk). Suspected it might have been related to encoding so tried adjusting and it make have then cached some ugly data. |
I missed that you said this:
Non-persistent variables would not cause the issue you had. Given it ended up being stored to the Java Preference, it must have been a variable that was set as persistent. It is best to not use persistent Global variables (I know it wasn't done on purpose) to store binary data given that it eventually gets converted inefficiently to JSON when Reshaper is unloaded and deserialized from that inefficient JSON when reloading Reshaper. The issue in your case is caused by the fact that for whatever reason, the Jackson JSON serializer does not escape the ASCII DEL character (127) on write, yet does not allow deserialization of the raw character on reading the same JSON it wrote 🤷♂️🙃. If needing to persist binary data, I recommend using the Then Save File action to save the binary data to a file instead. Then you can use the file variable tag or the Then Read File action to read file for your use. |
Probably due to saving a web server response that included binary data from an .jpg file into non-persistent variable
Are these non-peristant variables written to the project file ? if so this blocks rectification of the problem since the extension wont load on next project start.
Kind of sticky as without created a whole new burp project file (resulting in data loss) i can't continue to use Reshaper.
Without a update version of Reshaper any idea how i can get around an effectively broken burp project file to clear this data ?
(as a workaround in future i can just clear the variable containing binary data after each use so it never gets stored)
Version 2.5.3
Burp v2024.12.1
}
com.fasterxml.jackson.databind.JsonMappingException: special characters are not allowed
at [Source: (StringReader); line: 1, column: 12825] (through reference chain: synfron.reshaper.burp.core.settings.WorkspacesExport["workspaces"]->java.util.ArrayList[0]->synfron.reshaper.burp.core.settings.WorkspaceExport["variables"])
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:402)
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:361)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1826)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:359)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4730)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3677)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3660)
at synfron.reshaper.burp.core.utils.Serializer.deserialize(Serializer.java:115)
at synfron.reshaper.burp.core.settings.Storage.get(Storage.java:18)
at synfron.reshaper.burp.core.settings.SettingsManager.loadPersistentWorkspaces(SettingsManager.java:46)
at synfron.reshaper.burp.core.settings.Workspaces.get(Workspaces.java:26)
at burp.BurpExtender.initialize(BurpExtender.java:32)
at burp.Zfwj.ZA(Unknown Source)
at burp.Zsld.Zz(Unknown Source)
at burp.Zslq.lambda$initialiseOnNewThread$0(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1570)
Caused by: com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException: special characters are not allowed
at [Source: (StringReader); line: 1, column: 12825]
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:425)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:350)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
... 24 more
Caused by: unacceptable code point '�' (0x7F) special characters are not allowed
in "'reader'", position 461
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:204)
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:169)
at org.yaml.snakeyaml.reader.StreamReader.prefix(StreamReader.java:141)
at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalarNonSpaces(ScannerImpl.java:1954)
at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalar(ScannerImpl.java:1905)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchFlowScalar(ScannerImpl.java:1082)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchDouble(ScannerImpl.java:1064)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:452)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:263)
at org.yaml.snakeyaml.parser.ParserImpl$ParseFlowSequenceEntry.produce(ParserImpl.java:790)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:185)
at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:195)
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:419)
... 29 more
The text was updated successfully, but these errors were encountered: