Skip to content

IsURL is accepting "http//" as legitimate URL prefix #494

Open
@mpkondrashin

Description

@mpkondrashin

Bug Report

Summary

IsURL is accepting "http//" as legitimate URL prefix

github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2

Current behavior

govalidator.IsURL("http//abc.com") returns true.

How to reproduce

package main

import (
	"fmt"
	"github.com/asaskevich/govalidator"
)

func Main() {
	fmt.Println(govalidator.IsURL("http//abc.com"))
}

Expected behavior

IsURL is expected to return false for "http//abc.com"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions