From 5cb81176f5a8f73314206f89e55c572742827b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Thu, 1 Aug 2024 10:48:11 +0200 Subject: [PATCH 1/5] Issue #3637: Use FQDN in URLs. --- bin/docker/quick_setup.pl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/docker/quick_setup.pl b/bin/docker/quick_setup.pl index 38897e9c5..186c0a401 100755 --- a/bin/docker/quick_setup.pl +++ b/bin/docker/quick_setup.pl @@ -243,7 +243,8 @@ sub Main { { my ( $Success, $Message ) = SetRootAtLocalhostPassword( - HTTPPort => $HTTPPort + HTTPPort => $HTTPPort, + FQDN => $FQDN, ); say $Message if defined $Message; @@ -292,7 +293,8 @@ sub Main { if ($AddUser) { my ( $Success, $Message ) = AddUser( - HTTPPort => $HTTPPort + HTTPPort => $HTTPPort, + FQDN => $FQDN, ); say $Message if defined $Message; @@ -302,7 +304,8 @@ sub Main { if ($AddAdminUser) { my ( $Success, $Message ) = AddAdminUser( - HTTPPort => $HTTPPort + HTTPPort => $HTTPPort, + FQDN => $FQDN, ); say $Message if defined $Message; @@ -312,7 +315,8 @@ sub Main { if ($AddCustomerUser) { my ( $Success, $Message ) = AddCustomerUser( - HTTPPort => $HTTPPort + HTTPPort => $HTTPPort, + FQDN => $FQDN, ); say $Message if defined $Message; @@ -602,7 +606,7 @@ sub SetRootAtLocalhostPassword { return 0, 'Password for root@localhost could not be set' unless $Success; # Protocol http is fine, as there is an automatic redirect - return 1, "Agent: http://localhost:$Param{HTTPPort}/otobo/index.pl user: root\@localhost pw: $Password"; + return 1, "Agent: http://$Param{FQDN}:$Param{HTTPPort}/otobo/index.pl user: root\@localhost pw: $Password"; } # update sysconfig settings in the database and deploy these settings @@ -794,7 +798,7 @@ sub AddUser { } # looks good - return 1, "Sample user: http://localhost:$Param{HTTPPort}/otobo/index.pl user: $Login pw: $Login"; + return 1, "Sample user: http://$Param{FQDN}:$Param{HTTPPort}/otobo/index.pl user: $Login pw: $Login"; } sub AddAdminUser { @@ -866,7 +870,7 @@ sub AddAdminUser { ); # looks good - return 1, "Admin user: http://localhost:$Param{HTTPPort}/otobo/index.pl user: $Login pw: $Login"; + return 1, "Admin user: http://$Param{FQDN}:$Param{HTTPPort}/otobo/index.pl user: $Login pw: $Login"; } sub AddCustomerUser { @@ -929,7 +933,7 @@ sub AddCustomerUser { return 0, "Could not set the password for $Login" unless $PasswordSetSuccess; # looks good - return 1, "Customer: http://localhost:$Param{HTTPPort}/otobo/customer.pl user: $Login pw: $Login"; + return 1, "Customer: http://$Param{FQDN}:$Param{HTTPPort}/otobo/customer.pl user: $Login pw: $Login"; } sub AddCalendar { From c070d04835eb2a7fc0794716fd05c73bb80e8ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Thu, 1 Aug 2024 12:58:13 +0200 Subject: [PATCH 2/5] Issue #3637: Added no critic statement for FindBin module. --- bin/docker/quick_setup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/docker/quick_setup.pl b/bin/docker/quick_setup.pl index 186c0a401..e63f08890 100755 --- a/bin/docker/quick_setup.pl +++ b/bin/docker/quick_setup.pl @@ -112,7 +112,7 @@ =head1 OPTIONS use warnings; use utf8; -use FindBin qw($Bin); +use FindBin qw($Bin); ## no critic qw(Community::DiscouragedModules Freenode::DiscouragedModules) use lib "$Bin/../.."; use lib "$Bin/../../Kernel/cpan-lib"; use lib "$Bin/../../Custom"; From 81b3b714d3cd113945cea07ef77ab1af931d7f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Thu, 1 Aug 2024 14:16:13 +0200 Subject: [PATCH 3/5] Issue #3637: Fetching default fqdn from Net::Domain::hostfqdn. --- bin/docker/quick_setup.pl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/docker/quick_setup.pl b/bin/docker/quick_setup.pl index e63f08890..765866c0c 100755 --- a/bin/docker/quick_setup.pl +++ b/bin/docker/quick_setup.pl @@ -119,6 +119,7 @@ =head1 OPTIONS # core modules use Getopt::Long qw(GetOptions); +use Net::Domain qw(hostfqdn); use Pod::Usage qw(pod2usage); use Sub::Util qw(subname); @@ -131,16 +132,16 @@ =head1 OPTIONS use Kernel::System::ObjectManager (); sub Main { - my $HelpFlag; # print help - my $DBPassword; # required - my $HTTPPort = 80; # only used for success message - my $ActivateElasticsearch = 0; # must be explicitly enabled - my $AddUser = 0; # must be explicitly enabled - my $AddAdminUser = 0; # must be explicitly enabled - my $AddCustomerUser = 0; # must be explicitly enabled - my $AddCalendar = 0; # must be explicitly enabled - my $HttpType = 'https'; # the SysConfig setting HttpType - my $FQDN = 'yourhost.example.com'; # the SysConfig setting HttpType + my $HelpFlag; # print help + my $DBPassword; # required + my $HTTPPort = 80; # only used for success message + my $ActivateElasticsearch = 0; # must be explicitly enabled + my $AddUser = 0; # must be explicitly enabled + my $AddAdminUser = 0; # must be explicitly enabled + my $AddCustomerUser = 0; # must be explicitly enabled + my $AddCalendar = 0; # must be explicitly enabled + my $HttpType = 'https'; # the SysConfig setting HttpType + my $FQDN = hostfqdn(); # the SysConfig setting FQDN GetOptions( 'help' => \$HelpFlag, From 34521abc11b268573c581520450b75371c295cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Thu, 1 Aug 2024 14:23:55 +0200 Subject: [PATCH 4/5] Issue #3637: Revert usage of hostfqdn. Remove no critic statement for FindBin. --- bin/docker/quick_setup.pl | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/bin/docker/quick_setup.pl b/bin/docker/quick_setup.pl index 765866c0c..7a1def087 100755 --- a/bin/docker/quick_setup.pl +++ b/bin/docker/quick_setup.pl @@ -112,14 +112,13 @@ =head1 OPTIONS use warnings; use utf8; -use FindBin qw($Bin); ## no critic qw(Community::DiscouragedModules Freenode::DiscouragedModules) +use FindBin qw($Bin); use lib "$Bin/../.."; use lib "$Bin/../../Kernel/cpan-lib"; use lib "$Bin/../../Custom"; # core modules use Getopt::Long qw(GetOptions); -use Net::Domain qw(hostfqdn); use Pod::Usage qw(pod2usage); use Sub::Util qw(subname); @@ -132,16 +131,16 @@ =head1 OPTIONS use Kernel::System::ObjectManager (); sub Main { - my $HelpFlag; # print help - my $DBPassword; # required - my $HTTPPort = 80; # only used for success message - my $ActivateElasticsearch = 0; # must be explicitly enabled - my $AddUser = 0; # must be explicitly enabled - my $AddAdminUser = 0; # must be explicitly enabled - my $AddCustomerUser = 0; # must be explicitly enabled - my $AddCalendar = 0; # must be explicitly enabled - my $HttpType = 'https'; # the SysConfig setting HttpType - my $FQDN = hostfqdn(); # the SysConfig setting FQDN + my $HelpFlag; # print help + my $DBPassword; # required + my $HTTPPort = 80; # only used for success message + my $ActivateElasticsearch = 0; # must be explicitly enabled + my $AddUser = 0; # must be explicitly enabled + my $AddAdminUser = 0; # must be explicitly enabled + my $AddCustomerUser = 0; # must be explicitly enabled + my $AddCalendar = 0; # must be explicitly enabled + my $HttpType = 'https'; # the SysConfig setting HttpType + my $FQDN = 'yourhost.example.com'; # the SysConfig setting FQDN GetOptions( 'help' => \$HelpFlag, From 6f51b66b6cc4095a32fd0c6d455d4362b6612ba4 Mon Sep 17 00:00:00 2001 From: bernhard Date: Fri, 2 Aug 2024 09:44:46 +0200 Subject: [PATCH 5/5] Replace otobo.de with otobo.io in dot-files --- .bash_completion | 2 +- .screenrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bash_completion b/.bash_completion index 481dd3c6b..e1469afd3 100644 --- a/.bash_completion +++ b/.bash_completion @@ -1,6 +1,6 @@ # -- # Copyright (C) 2001-2020 OTRS AG, https://otrs.com/ -# Copyright (C) 2019-2024 Rother OSS GmbH, https://otobo.de/ +# Copyright (C) 2019-2024 Rother OSS GmbH, https://otobo.io/ # -- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU AFFERO General Public License as published by diff --git a/.screenrc b/.screenrc index bbf378643..dc0109a54 100644 --- a/.screenrc +++ b/.screenrc @@ -1,5 +1,5 @@ # -- -# Copyright (C) 2019-2024 Rother OSS GmbH, https://otobo.de/ +# Copyright (C) 2019-2024 Rother OSS GmbH, https://otobo.io/ # -- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU AFFERO General Public License as published by