Skip to content

Conversation

@seaerchin
Copy link
Collaborator

Problem

go has a blacklist for link shorteners, but this check is a case agnostic check, which means that Bit.ly for example, passes the chekc but bit.ly does not

Solution

  1. make teh check case insensitive by converting the url to lowercase in the check. opted against converting the url to lowercase outright incase case matters for the actual url

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a security vulnerability in the URL blacklist validation where case variations in domain names could bypass blacklist checks. The fix ensures that URLs like https://Bit.ly/abc are properly caught alongside https://bit.ly/abc.

Key Changes:

  • Modified isBlacklisted() to perform case-insensitive matching by converting URLs to lowercase before checking against the blacklist

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@dcshzj dcshzj left a comment

Choose a reason for hiding this comment

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

Approving first, also should add tests for this.

@seaerchin seaerchin force-pushed the fix/case-sensitivity branch from e699676 to 8f07f27 Compare December 9, 2025 04:47
@seaerchin seaerchin merged commit f88ff0e into develop Dec 9, 2025
18 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