ItzSomebody / radon

[Abandoned] Scuffed java bytecode obfuscator
GNU General Public License v3.0
362 stars 74 forks source link

Bad usage of Map in ExclusionManager can lead to undesired effects #106

Open ItzSomebody opened 1 year ago

ItzSomebody commented 1 year ago

The current implementation of ExclusionManager takes a Map<String, String> as a constructor as a collection of patterns.

https://github.com/ItzSomebody/radon/blob/7d3e8719afdb832c95ca19e2817e33d2b3f36c32/xyz.itzsomebody.radon/src/main/java/xyz/itzsomebody/radon/exclusions/ExclusionManager.java#L30-L44

This is a flawed implementation because it allows for overwriting exclusion patterns in the map, causing them to vanish. Need to also change this line as well:

https://github.com/ItzSomebody/radon/blob/7d3e8719afdb832c95ca19e2817e33d2b3f36c32/xyz.itzsomebody.radon/src/main/java/xyz/itzsomebody/radon/config/ExclusionsDeserializer.java#L30-L38

Thanks to lokirus for finding the side effects of my dumb code logic errors!