Development

#3000 ([PATCH] 1.1 url validator will not accept FTP URLs)

You must first sign up to be able to contribute.

Ticket #3000 (closed enhancement: fixed)

Opened 11 months ago

Last modified 9 months ago

[PATCH] 1.1 url validator will not accept FTP URLs

Reported by: Carl.Vondrick Assigned to: fabien
Priority: minor Milestone:
Component: validation Version: 1.1.0 DEV
Keywords: Cc:
Qualification: Unreviewed

Description

The 1.0 sfUrlValidator accepts the FTP protocol while the 1.1 sfValidatorUrl rejects it:

ftp://google.com/foobar.tgz passes in sfUrlValidator in 1.0
ftp://google.com/foobar fails in sfValidatorUrl in 1.1

Not sure if this is intentional or not, but possible patch attached.

Attachments

sfValidatorUrl.class.php.patch (1.3 kB) - added by Carl.Vondrick on 02/24/08 04:54:53.
Patch for sfValidatorUrl to accept the FTP protocol.

Change History

02/24/08 04:54:53 changed by Carl.Vondrick

  • attachment sfValidatorUrl.class.php.patch added.

Patch for sfValidatorUrl to accept the FTP protocol.

02/24/08 17:23:24 changed by Markus.Staab

hm... also ftps?

and what do you think about other protocols like telnet, irc,... maybe this should be configurable in the yml file which defines the validator..

02/24/08 17:58:24 changed by Carl.Vondrick

It's possible to override the regular expression if necessary. I think telnet, gopher, IRC, etc might be a little excessive by default though.

04/05/08 20:24:13 changed by FabianLange

  • status changed from new to closed.
  • resolution set to fixed.

(In [8322]) sfValidatorUrl will accept FTP urls by default as well. closes #3000

04/05/08 21:45:48 changed by Markus.Staab

if supporting ftp, then you should also support ftps