summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-12-16 20:17:05 +0100
committerGitHub <noreply@github.com>2017-12-16 20:17:05 +0100
commit334bead74bc9c5e819f14946726eaad40986d636 (patch)
treee7ecf8d4eba2e6a046da8a9dc8828f35b75c7428 /Bugzilla/Config
parent49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff)
downloadbugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz
bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r--Bugzilla/Config/Advanced.pm6
-rw-r--r--Bugzilla/Config/Attachment.pm8
-rw-r--r--Bugzilla/Config/Common.pm28
-rw-r--r--Bugzilla/Config/Core.pm46
4 files changed, 2 insertions, 86 deletions
diff --git a/Bugzilla/Config/Advanced.pm b/Bugzilla/Config/Advanced.pm
index d7fdd34aa..dc5be490f 100644
--- a/Bugzilla/Config/Advanced.pm
+++ b/Bugzilla/Config/Advanced.pm
@@ -17,12 +17,6 @@ our $sortkey = 1700;
use constant get_param_list => (
{
- name => 'cookiedomain',
- type => 't',
- default => ''
- },
-
- {
name => 'inbound_proxies',
type => 't',
default => '',
diff --git a/Bugzilla/Config/Attachment.pm b/Bugzilla/Config/Attachment.pm
index bc2f45029..c3dbd03ed 100644
--- a/Bugzilla/Config/Attachment.pm
+++ b/Bugzilla/Config/Attachment.pm
@@ -24,12 +24,6 @@ sub get_param_list {
default => 0
},
{
- name => 'attachment_base',
- type => 't',
- default => '',
- checker => \&check_urlbase
- },
- {
name => 'allow_attachment_deletion',
type => 'b',
default => 0
@@ -68,7 +62,7 @@ sub get_param_list {
sub check_params {
my ( $class, $params ) = @_;
- return unless $params->{attachment_storage} eq 's3';
+ return '' unless $params->{attachment_storage} eq 's3';
if ( $params->{s3_bucket} eq ''
|| $params->{aws_access_key_id} eq ''
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index 8b1a9da91..fabf7c880 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -23,7 +23,7 @@ use Bugzilla::Status;
use base qw(Exporter);
@Bugzilla::Config::Common::EXPORT = qw(
check_multi check_numeric check_regexp check_url check_group
- check_sslbase check_priority check_severity check_platform
+ check_priority check_severity check_platform
check_opsys check_shadowdb check_urlbase check_webdotbase
check_user_verify_class
check_mail_delivery_method check_notification check_utf8
@@ -81,32 +81,6 @@ sub check_email {
return "";
}
-sub check_sslbase {
- my $url = shift;
- if ( $url ne '' ) {
- if ( $url !~ m#^https://([^/]+).*/$# ) {
- return "must be a legal URL, that starts with https and ends with a slash.";
- }
- my $host = $1;
-
- # Fall back to port 443 if for some reason getservbyname() fails.
- my $port = getservbyname( 'https', 'tcp' ) || 443;
- if ( $host =~ /^(.+):(\d+)$/ ) {
- $host = $1;
- $port = $2;
- }
- local *SOCK;
- my $proto = getprotobyname('tcp');
- socket( SOCK, PF_INET, SOCK_STREAM, $proto );
- my $iaddr = inet_aton($host) || return "The host $host cannot be resolved";
- my $sin = sockaddr_in( $port, $iaddr );
- if ( !connect( SOCK, $sin ) ) {
- return "Failed to connect to $host:$port; unable to enable SSL";
- }
- close(SOCK);
- }
- return "";
-}
sub check_utf8 {
my $utf8 = shift;
diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm
deleted file mode 100644
index b3848a16e..000000000
--- a/Bugzilla/Config/Core.pm
+++ /dev/null
@@ -1,46 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.
-
-package Bugzilla::Config::Core;
-
-use 5.10.1;
-use strict;
-use warnings;
-
-use Bugzilla::Config::Common;
-
-our $sortkey = 100;
-
-use constant get_param_list => (
- {
- name => 'urlbase',
- type => 't',
- default => '',
- checker => \&check_urlbase
- },
-
- {
- name => 'ssl_redirect',
- type => 'b',
- default => 0
- },
-
- {
- name => 'sslbase',
- type => 't',
- default => '',
- checker => \&check_sslbase
- },
-
- {
- name => 'cookiepath',
- type => 't',
- default => '/'
- },
-);
-
-1;