Skip to content

Conversation

@SayakaOno
Copy link
Collaborator

@SayakaOno SayakaOno commented Oct 31, 2025

Description

  • Update isValidUrl function
    • Use Google Web Risk API to prevent storing unsafe URLs.
    • Add a minimal HTTP URL format validation.
  • Make the regex for social validation case-insensitive. (addresses this comment)

The Web Risk API must be enabled in the Google Cloud Console for this feature to work:

Screenshot 2025-10-31 at 10 24 50 AM Screenshot 2025-10-31 at 10 23 54 AM

Jira link: https://lite-farm.atlassian.net/browse/LF-5011

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested with postman.
Sample malware URL: http%3A%2F%2Ftestsafebrowsing.appspot.com%2Fs%2Fmalware.html

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have ordered translation keys alphabetically (optional: run pnpm i18n to help with this)
  • I have added the GNU General Public License to all new files

@SayakaOno SayakaOno self-assigned this Oct 31, 2025
@SayakaOno SayakaOno added the enhancement New feature or request label Oct 31, 2025
@SayakaOno SayakaOno force-pushed the LF-4996/Create_GET_endpoint_to_fetch_Market_directory_info branch from 7f8f2b0 to dacfa23 Compare November 4, 2025 16:46
@SayakaOno SayakaOno force-pushed the LF-5011/Add_Google_Lookup_API_validation_to_websites_before_storing_to_database branch from 68f43a2 to 804b617 Compare November 4, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants