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

Bugfix: getBaseDomain should return null when invalid #1410

Merged

Conversation

englehardt
Copy link
Contributor

This fixes a regression in the ad domain detection where we expect getBaseDomain to return null when a domain provided by SERP is unparsable, but getBaseDomain will always return the hostname (even if it's nonsensical).

This is Ad 11 and Add 12 in https://www.search-company.site/

I also fixed a no-op test that we forgot to update when we first merged the bat.js work. I only detected it because I had an outdated privacy grade reference that was still returning firstParty when running the tests locally.

Reviewer: @jonathanKingston

Description:

Steps to test this PR:

Automated tests:

  • Unit tests
  • Integration tests
Reviewer Checklist:
  • Ensure the PR solves the problem
  • Review every line of code
  • Ensure the PR does no harm by testing the changes thoroughly
  • Get help if you're uncomfortable with any of the above!
  • Determine if there are any quick wins that improve the implementation
PR Author Checklist:
  • Get advice or leverage existing code
  • Agree on technical approach with reviewer (if the changes are nuanced)
  • Ensure that there is a testing strategy (and documented non-automated tests)
  • Ensure there is a documented monitoring strategy (if necessary)
  • Consider systems implications

Copy link
Collaborator

@jonathanKingston jonathanKingston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@jonathanKingston jonathanKingston merged commit e51650f into duckduckgo:develop Sep 19, 2022
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.

None yet

2 participants