Skip to content

Conversation

@diegmonti
Copy link

@diegmonti diegmonti commented Dec 15, 2025

Description:

Change the regex pattern from [a-z0-9]{32} to [a-f0-9]{32} to only detect valid hexadecimal tokens, reducing false positives.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Change the regex pattern from [a-z0-9]{32} to [a-f0-9]{32} to only
detect valid hexadecimal tokens, reducing false positives.
@CLAassistant
Copy link

CLAassistant commented Dec 15, 2025

CLA assistant check
All committers have signed the CLA.

@diegmonti diegmonti marked this pull request as ready for review December 15, 2025 16:43
@diegmonti diegmonti requested a review from a team December 15, 2025 16:43
@diegmonti diegmonti requested a review from a team as a code owner December 15, 2025 16:43
@shahzadhaider1
Copy link
Contributor

Hi @diegmonti,
Thank you for taking the time to open this PR. We really appreciate your contribution to the project.

To help reviewers confidently assess this change, could you please share any supporting documentation, specification, or authoritative reference confirming that Dandelion tokens are strictly hexadecimal ([a-f0-9]{32})?

Providing such context would make it easier for reviewers to verify the correctness of the change and ensure we’re not unintentionally missing valid tokens. Thanks again for your effort and support!

@vad
Copy link

vad commented Dec 16, 2025

Hi @shahzadhaider1, Dandelion developer here. You can check my organizations here on github, my role at https://www.spaziodati.eu/team and the Dandelion ownership in the footer of https://dandelion.eu/ .

We don’t strictly enforce tokens to be hexadecimal, but it’s also true that there are still some old tokens around that aren’t even 32 characters long, as detected by the current regex. All recent tokens follow exactly the format proposed by @diegmonti , so I’m fine with it.

Also, since the current detector implementation makes API calls to check whether a token is valid, we’ve noticed some request spikes (maybe a CI gone wild?) that we’d like to try to reduce.

@shahzadhaider1
Copy link
Contributor

Hi @shahzadhaider1, Dandelion developer here. You can check my organizations here on github, my role at https://www.spaziodati.eu/team and the Dandelion ownership in the footer of https://dandelion.eu/ .

We don’t strictly enforce tokens to be hexadecimal, but it’s also true that there are still some old tokens around that aren’t even 32 characters long, as detected by the current regex. All recent tokens follow exactly the format proposed by @diegmonti , so I’m fine with it.

Also, since the current detector implementation makes API calls to check whether a token is valid, we’ve noticed some request spikes (maybe a CI gone wild?) that we’d like to try to reduce.

Grazie Davide, for the explanation.

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