Dependencies: commons-configuration and commons-lang #748
-
Hello, I've done a little research and it looks like the owasp Java Encoder is compatible with commons-lang3, but I wasn't sure if the main ESAPI project is fully compatible. I couldn't find any information on whether commons-configuration2 was compatible. Are these planned to be updated in the future, or are there some workarounds you'd suggest? Thank you for your time! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Tracking this through maven, I believe it's more accurate to say that replacement dependencies are available. ESAPI is using the latest versions available for both commons-configuration and commons-lang. Library dependencies are candidates for updates, so long as no existing capability is lost or otherwise negatively impacted. There is a normal update process for any dependency that has a newer version, or for dependencies which have CVE's listed in the NVD Database. So far as I can tell neither of these conditions is true for either of the listed artifacts. There does not appear to be any issues created to perform the conversion to either of the newer dependencies you've referenced, but I believe that would be the most likely course. Generate a task in the project identifying the potential for dependency replacement. You are also welcome, and encouraged, to create a fork and try it out. These are the links I used for reference: NVD commons-lang If you would like to try to "work around", you can make the attempt to replace these dependencies by using exclude clauses in your pom for the two projects of interest, then specifically include the replacements you'd like to try. If the API's are an exact match, it might work, but I'm not sure I'd have very high expectations. |
Beta Was this translation helpful? Give feedback.
-
I tried doing a flat-out replacement of the dependencies in ESAPI, and the project does not compile as-is. I did not do much digging into the 'why', but it's worth noting that this conversion may take some scale of effort, and the "work around" I posted above cannot work. These are the dependency references I used.
|
Beta Was this translation helpful? Give feedback.
-
@RockefellerA wrote:
I can't comment on the OWASP Java Encoder Project. You'd have to ask them.
To add to what @jeremiahjstacey wrote, even if no changes were required to ESAPI and all the tests passed, there are additional considerations when one is a library provider and one decides to upgrade to a newer major revision of a library (which seems to be the case for both commons-configuration2 and commons-lang3). We generally try to avoid bumping to a major revision of a dependency unless there is good reason to. Some of those valid reasons might be:
But we try to be really cautious when we make that decision. Why? Well, when considered from a semantic naming perspective, bumps in a library's major # does not guarantee backward compatibility with the previous major #. In fact, worse than that, it may require extensive code changes. (E.g., compare Apache Struts 1.x to Struts 2.x.) Now one could imagine ESAPI using just a class or 2 from a dependent library (in fact, that is the case for commons-configuration, where we only use This is why you might here library developers take the "if it ain't broke, don't fix it" approach. It's not that we are lazy, but rather, we're just trying to watch out for our clients best interests. Hope that makes sense. If not, please ask questions so I can try to clarify our position. |
Beta Was this translation helpful? Give feedback.
@RockefellerA wrote:
I can't comment on the OWASP Java Encoder Project. You'd have to ask them.
To add to what @je…