Skip to content

fix: Thoth geoip compare#1564

Merged
JasonLovesDoggo merged 3 commits intoTecharoHQ:mainfrom
lenny87:thoth-geoip-compare-fix
Apr 24, 2026
Merged

fix: Thoth geoip compare#1564
JasonLovesDoggo merged 3 commits intoTecharoHQ:mainfrom
lenny87:thoth-geoip-compare-fix

Conversation

@lenny87
Copy link
Copy Markdown
Contributor

@lenny87 lenny87 commented Apr 15, 2026

There is case-sensitivity mismatch in geoipchecker.go

  1. GeoIPCheckerFor stored country codes as-is (e.g., "CZ")
  2. Check lowercased the lookup result before comparing (strings.ToLower(ipInfo.GetCountryCode()))

So "CZ", according to docs, in config never matched "cz" from the gRPC response.

Checklist:

  • Added a description of the changes to the [Unreleased] section of docs/docs/CHANGELOG.md
  • [N] Added test cases to the relevant parts of the codebase
  • Ran integration tests npm run test:integration (unsupported on Windows, please use WSL)
  • All of my commits have verified signatures

@lenny87 lenny87 changed the title Thoth geoip compare fix fix: Thoth geoip compare Apr 15, 2026
lenny87 added 2 commits April 15, 2026 21:03
1. GeoIPCheckerFor stored country codes as-is (e.g., "CZ")
2. Check lowercased the lookup result before comparing (strings.ToLower(ipInfo.GetCountryCode()))

So "CZ" in config never matched "cz" from the gRPC response.

Signed-off-by: Jakub Lansky <jakub@lansky.biz>
Signed-off-by: Jakub Lansky <jakub@lansky.biz>
@lenny87 lenny87 force-pushed the thoth-geoip-compare-fix branch from 137b672 to d75bf80 Compare April 15, 2026 19:04
Signed-off-by: Jason Cameron <git@jasoncameron.dev>
@JasonLovesDoggo
Copy link
Copy Markdown
Member

LGTM, Thanks for the PR!

@JasonLovesDoggo JasonLovesDoggo enabled auto-merge (squash) April 24, 2026 14:33
@JasonLovesDoggo JasonLovesDoggo merged commit f8605bc into TecharoHQ:main Apr 24, 2026
21 checks passed
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.

2 participants