Skip to content
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

Current legacy parser #9

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

strato-cumulus
Copy link

This exposes two different versions of uap-core through uap-java. Some notes about the changes:

  • CurrentParser and LegacyParser have been extracted as distinct classes because I wanted to abstract out dealing with the underlying regex file, There has also been one code change in the equals method of UserAgent in the parent repo accommodating for newer versions of the regex list - there's a switch which turns it on in CurrentParser to ensure maximum compatibility.
  • I verified that CachingParser is not used in dmp, so I did not split it out, making only a minimal code change so that it points to the newer version.

@diogoaurelio
Copy link

@strato-cumulus : sorry, I think I am missing the big picture here. My doubts are:

  • why do we need to bring to uap-java lib the concept of Legacy and Currency? Aren't these terms that only make sense in the context of DMP?
  • afaiu, there are only 2 differences: regex file being used and a minor fork in the implementation of "UserAgentParser", which varies in its match method; the regex file we can inject from the outside (in dmp when we instantiate the parser), right?; the UserAgentParser change is trying to affect when to mutate fileds v2 and v3, by assuring that we only assign either null or values that are different than empty string; besides seemingly a microscopic change, am wondering if we couldn't just rather make the UAPattern class public, and optionally inject the class in UserAgentParser? This would save us the need to inject in this library concepts from the DMP.

THe SSP needs this change. And we should go with it, as it get rids of a
jackson version with a big vulnerability.
@Inframan Inframan force-pushed the current-legacy-parser branch 2 times, most recently from 8ccc0ba to 57f4fca Compare January 25, 2024 12:44
@Inframan Inframan force-pushed the current-legacy-parser branch from a59bc5f to e994e87 Compare January 25, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants