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

fix: fixed verification logic & endpoint for AyrShare #3452

Merged

Conversation

sahil9001
Copy link
Contributor

@sahil9001 sahil9001 commented Oct 17, 2024

Description:

Fixes #3451 , tests screenshots:
Screenshot 2024-10-17 at 3 04 37 PM

Checklist:

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

@sahil9001
Copy link
Contributor Author

sahil9001 commented Oct 17, 2024

@zricethezav

@rgmz
Copy link
Contributor

rgmz commented Oct 17, 2024

Please don't ping me for every change that you make.

@sahil9001
Copy link
Contributor Author

Please don't ping me for every change that you make.

Sure, sorry for that.

@sahil9001
Copy link
Contributor Author

I thought you were an active contributor, so added you, else I don't know who is managing Hacktoberfest here.

@rgmz
Copy link
Contributor

rgmz commented Oct 17, 2024

I thought you were an active contributor,

I am, but I'm just a random guy.

@sahil9001 sahil9001 changed the title fix: fixed verification endpoint for AyrShare fix: fixed verification logic for AyrShare Oct 17, 2024
@sahil9001 sahil9001 changed the title fix: fixed verification logic for AyrShare fix: fixed verification logic & endpoint for AyrShare Oct 17, 2024
@@ -48,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}

if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://app.ayrshare.com/api/analytics/links", nil)
req, err := http.NewRequestWithContext(ctx, "GET", "https://app.ayrshare.com/api/user", nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

The /user API returns useful information, such as the user's email, which can be included in the extra data.
I also recommend reviewing the status code documentation to handle responses appropriately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@kashifkhan0771 kashifkhan0771 left a comment

Choose a reason for hiding this comment

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

Thank you @sahil9001 for fixing this detector regex. Changes LGTM!

@zricethezav
Copy link
Collaborator

First official hacktoberfest-2024 merged PR 🥂. Nice work.

@zricethezav zricethezav merged commit 3499df6 into trufflesecurity:main Oct 18, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Issue with incorrect validation logic for AyrShare
4 participants