Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Tweak validation rules for host names
Browse files Browse the repository at this point in the history
Fixes #93.
  • Loading branch information
Jamie Snape committed Mar 16, 2015
1 parent af13c8c commit 8c0614b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/ldap/forms/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function init()
$hostName->setLabel('LDAP Server Name');
$hostName->setRequired(true);
$hostName->addValidator('NotEmpty', true);
$hostName->addValidator('Hostname', true);
$hostName->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false));

$port = new Zend_Form_Element_Text(LDAP_PORT_KEY);
$port->setLabel('LDAP Server Port');
Expand All @@ -48,7 +48,7 @@ public function init()
$backupServer = new Zend_Form_Element_Text(LDAP_BACKUP_SERVER_KEY);
$backupServer->setLabel('Backup Server Name');
$backupServer->addValidator('NotEmpty', true);
$backupServer->addValidator('Hostname', true);
$backupServer->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false));

$bindRdn = new Zend_Form_Element_Text(LDAP_BIND_RDN_KEY);
$bindRdn->setLabel('Bind DN');
Expand Down
2 changes: 1 addition & 1 deletion modules/mail/forms/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function init()
$smtpHost = new Zend_Form_Element_Text(MAIL_SMTP_HOST_KEY);
$smtpHost->setLabel('Server name');
$smtpHost->addValidator('NotEmpty', true);
$smtpHost->addValidator('Hostname', true);
$smtpHost->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false));

$smtpPort = new Zend_Form_Element_Text(MAIL_SMTP_PORT_KEY);
$smtpPort->setLabel('Port');
Expand Down
2 changes: 1 addition & 1 deletion modules/solr/forms/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function init()
$host->setLabel('Solr Host');
$host->setRequired(true);
$host->addValidator('NotEmpty', true);
$host->addValidator('Hostname', true);
$host->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false));

$port = new Zend_Form_Element_Text(SOLR_PORT_KEY);
$port->setLabel('Solr Port');
Expand Down

0 comments on commit 8c0614b

Please sign in to comment.