govalidator icon indicating copy to clipboard operation
govalidator copied to clipboard

IsRequestURI fails for non-absolute URLs

Open andrewpmartinez opened this issue 2 years ago • 0 comments

Bug Report

Q A
Version(s) v11.0.1 and earlier?

Summary

APIs that return relative URIs fail to validate as url.ParseRequestURI is used instead of url.Parse. ParseRequestURI is documented as:

... the url is interpreted only as an absolute URI or an absolute path.

Current behavior

Relative URIs fail validation (e.g. ./some-path)

How to reproduce

Attempt to validate a relative URI. (e.g. ./some-path)

Expected behavior

Aboslute and relative URIs pass validation.

andrewpmartinez avatar Jun 08 '22 16:06 andrewpmartinez