Skip to content
This repository was archived by the owner on Dec 16, 2019. It is now read-only.
This repository was archived by the owner on Dec 16, 2019. It is now read-only.

Username portion causes failure if > 16 characters #4

Description

@jaydiablo

I've looked over the regex and can't seem to figure out why this would happen.

We had a case where php-url-validator was rejecting a URL because the username was too long.

For example, if I put this URL in the test suite, it fails:

https://abcefghijklmnopst:dklsfjkdsfjkldsfdsdsfdsffsdfsafsdafdsafdsafdsasfdsfdsfsdb@api.twilio.com

However, if I reduce the username by 1 character, it passes:

https://abcefghijklmnops:dklsfjkdsfjkldsfdsdsfdsffsdfsafsdafdsafdsafdsasfdsfdsfsdb@api.twilio.com

Any idea why this might be happening? (Notice that the password field can be any length, i.e., this still fails)

https://abcefghijklmnopst:dklsf@api.twilio.com

but this passes:

https://abcefghijklmnops:dklsf@api.twilio.com

I tried changing the named parameter in the regex to something other than "username", just in case, but it still fails if over 16 characters.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions