Closed samwinslow closed 2 years ago
Hello again. It seems there is a bug with URL validation on the frontend.
I have written a few test cases here which illustrate the bug (see frontend/src/lib/utils.test.ts for existing tests):
it('recognizes URLs propertly', () => { expect(isURL('https://www.posthog.com')).toEqual(true) expect(isURL('http://www.posthog.com')).toEqual(true) expect(isURL('http://www.posthog.com:8000/images')).toEqual(true) expect(isURL('http://localhost:8000/login?next=/insights')).toEqual(true) expect(isURL('http://localhost:8000/events?properties=%5B%5D')).toEqual(true) expect(isURL('https://apple.com/')).toEqual(true) // works as expected expect(isURL('https://stripe.com')).toEqual(true) // fails expect(isURL('https://spotify.com')).toEqual(true) // fails expect(isURL('https://sevenapp.events/')).toEqual(true) // fails expect(isURL('https://seven-stagingenv.web.app/')).toEqual(true) // fails expect(isURL('https://salesforce.co.uk/')).toEqual(true) // fails })
hello :3 thanks for the issue, hope it's resolved? @samwinslow
Bug description
Hello again. It seems there is a bug with URL validation on the frontend.
How to reproduce
I have written a few test cases here which illustrate the bug (see frontend/src/lib/utils.test.ts for existing tests):
Environment
Additional context
Thank you for your bug report – we love squashing them!