Opened 2 years ago

Closed 2 years ago

#33877 closed Cleanup/optimization (wontfix)

Add accurate port validation to the URLValidator.

Reported by: Igor Izvekov Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Florian Apolloner Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A port of internet address (TCP and UDP) is a 16-bit number (0-65535) by RFC 1085 sec. 5.1 (https://datatracker.ietf.org/doc/rfc1085/).
Django's URLValidator accepts addresses with the port more than 65535 (For example, http://example:78000/).
This patch fixed that problem.

Change History (1)

comment:1 by Mariusz Felisiak, 2 years ago

Cc: Florian Apolloner added
Resolution: wontfix
Status: newclosed
Summary: Fixed port's problem in URLValidatorAdd accurate port validation to the URLValidator.
Type: BugCleanup/optimization

Thanks for this ticket, however we would prefer to keep the regex simple. It was also briefly discussed in #32930.

Note: See TracTickets for help on using tickets.
Back to Top