]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
no bug - Use BUGZILLA_ALLOW_INSECURE_HTTP instead of MOJO_TEST and BUGZILLA_UNSAFE_AU...
authorDylan William Hardison <dylan@hardison.net>
Fri, 25 Jan 2019 15:52:07 +0000 (10:52 -0500)
committerGitHub <noreply@github.com>
Fri, 25 Jan 2019 15:52:07 +0000 (10:52 -0500)
Bugzilla/App/Plugin/OAuth2.pm
Bugzilla/Install/Filesystem.pm
README.rst
auth.cgi
docker-compose.yml
t/mojo-oauth2.t
vagrant_support/start_morbo

index 3f2951de7a6beef02175f9932b780f5318b7d3f3..e49278c8d762ecf0fbf484aa835dafba37226500 100644 (file)
@@ -119,7 +119,7 @@ sub _verify_client {
     return (0, 'invalid_scope');
   }
 
-  if (!$ENV{MOJO_TEST} && Mojo::URL->new($redirect_uri)->scheme ne 'https') {
+  if (!$ENV{BUGZILLA_ALLOW_INSECURE_HTTP} && Mojo::URL->new($redirect_uri)->scheme ne 'https') {
     INFO("invalid_redirect_uri: $redirect_uri");
     return (0, 'invalid_redirect_uri');
   }
index 4ae0d733899d281663b007c2eb2a3c6c7c053a93..4c2cb5d4571d28e1fae7d8a5248f6653d8476f60 100644 (file)
@@ -48,7 +48,7 @@ our @EXPORT = qw(
 
 use constant HTTPD_ENV => qw(
   LOCALCONFIG_ENV
-  BUGZILLA_UNSAFE_AUTH_DELEGATION
+  BUGZILLA_ALLOW_INSECURE_HTTP
   LOG4PERL_CONFIG_FILE
   LOG4PERL_STDERR_DISABLE
   USE_NYTPROF
index b47aa1d561fa012aeda4d813fcdbf78feb240ac6..2a3142ef830baeffab35d7b42c705d1c46530022 100644 (file)
@@ -292,8 +292,8 @@ MOJO_CLIENTS
   this value and increase "MOJO_WORKERS" instead for better performance.
   Default: 200
 
-BUGZILLA_UNSAFE_AUTH_DELEGATION
-  This should never be set in production. It allows auth delegation over http.
+BUGZILLA_ALLOW_INSECURE_HTTP
+  This should never be set in production. It allows auth delegation and oauth over http.
 
 BMO_urlbase
   The public url for this instance. Note that if this begins with https://
index 66405fcb1c85be0867f3e76f609666bfc96e295c..3fc5f50d9aaf3e63bcb9fc29af9033039f941051 100755 (executable)
--- a/auth.cgi
+++ b/auth.cgi
@@ -47,7 +47,7 @@ ThrowUserError("auth_delegation_invalid_description")
 
 my $callback_uri = URI->new($callback);
 
-my $legal_protocol = $ENV{BUGZILLA_UNSAFE_AUTH_DELEGATION}
+my $legal_protocol = $ENV{BUGZILLA_ALLOW_INSECURE_HTTP}
   ? qr/^https?$/i    # http or https
   : qr/^https$/i;    # https only
 
index b00c6bc03d0accc465d91a0a051868b0a97dc5e7..8f2f6a34ef90694653b8aff46327a0641ce89a98 100644 (file)
@@ -18,7 +18,7 @@ services:
     environment: &bmo_env
       - LOCALCONFIG_ENV=1
       - LOG4PERL_CONFIG_FILE=log4perl-docker.conf
-      - BUGZILLA_UNSAFE_AUTH_DELEGATION=1
+      - BUGZILLA_ALLOW_INSECURE_HTTP=1
       - HTTP_BACKEND=simple
       - PORT=80
       - BMO_db_host=bmo-db.vm
index a5cb3defd2e643f6ea9bfd4a7be40d0668c705f7..e1e59abe68b5ae9c15038b6587b42c5368d0882a 100644 (file)
@@ -11,9 +11,9 @@ use 5.10.1;
 use lib qw( . lib local/lib/perl5 );
 
 BEGIN {
-  $ENV{LOG4PERL_CONFIG_FILE}     = 'log4perl-t.conf';
-  $ENV{BUGZILLA_DISABLE_HOSTAGE} = 1;
-  $ENV{MOJO_TEST}                = 1;
+  $ENV{LOG4PERL_CONFIG_FILE}         = 'log4perl-t.conf';
+  $ENV{BUGZILLA_DISABLE_HOSTAGE}     = 1;
+  $ENV{BUGZILLA_ALLOW_INSECURE_HTTP} = 1;
 }
 
 use Bugzilla::Test::MockDB;
index 926655b2e00349fee010feeda82f02d605620bc4..8909282f41d161877a21b7334abf2ffc9b0bda23 100644 (file)
@@ -1,10 +1,12 @@
 #!/usr/bin/env perl
 
-$ENV{PERL5LIB}    = '/vagrant/local/lib/perl5';
-$ENV{PATH}        = "/vagrant/local/bin:$ENV{PATH}";
-$ENV{MOJO_LISTEN} = 'http://*:80';
+$ENV{PERL5LIB}                     = '/vagrant/local/lib/perl5';
+$ENV{PATH}                         = "/vagrant/local/bin:$ENV{PATH}";
+$ENV{MOJO_LISTEN}                  = 'http://*:80';
+$ENV{BUGZILLA_ALLOW_INSECURE_HTTP} = 1;
 
-my @files = ('Bugzilla.pm', 'Bugzilla', glob("*.cgi"), 'extensions', 'template');
-my @watch=  map { ('-w' => $_) } (@files);
+my @files
+  = ('Bugzilla.pm', 'Bugzilla', glob("*.cgi"), 'extensions', 'template');
+my @watch = map { ('-w' => $_) } (@files);
 
 system morbo => @watch, '-v', 'bugzilla.pl';