From 0f75bdcdac465b3d5fbd0cbfda97be65604f25b6 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 5 May 2024 18:38:07 +0200 Subject: [PATCH 1/2] Use https links instead of http --- includes/account.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/account.php b/includes/account.php index 4e60e57..5e7e77e 100644 --- a/includes/account.php +++ b/includes/account.php @@ -156,7 +156,7 @@ function buildSubjectFromSession() { $emailid = mysql_insert_id(); $body = _("Below is the link you need to open to verify your email address. Once your address is verified you will be able to start issuing certificates to your heart's content!")."\n\n"; - $body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; + $body .= "https://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; $body .= _("Best regards")."\n"._("CAcert.org Support!"); sendmail($_REQUEST['email'], "[CAcert.org] "._("Email Probe"), $body, "support@cacert.org", "", "", "CAcert Support"); @@ -514,7 +514,7 @@ function buildSubjectFromSession() { { $id = 4; showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); showfooter(); exit; } else { @@ -665,7 +665,7 @@ function buildSubjectFromSession() { $domainid = mysql_insert_id(); $body = sprintf(_("Below is the link you need to open to verify your domain '%s'. Once your address is verified you will be able to start issuing certificates to your heart's content!"),$_SESSION['_config']['domain'])."\n\n"; - $body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=domain&domainid=$domainid&hash=$hash\n\n"; + $body .= "https://".$_SESSION['_config']['normalhostname']."/verify.php?type=domain&domainid=$domainid&hash=$hash\n\n"; $body .= _("Best regards")."\n"._("CAcert.org Support!"); sendmail($authaddy, "[CAcert.org] "._("Email Probe"), $body, "support@cacert.org", "", "", "CAcert Support"); @@ -777,7 +777,7 @@ function buildSubjectFromSession() { if(!file_exists($_SESSION['_config']['tmpfname'])) { showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); showfooter(); exit; } @@ -852,7 +852,7 @@ function buildSubjectFromSession() { { $id = 11; showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); showfooter(); exit; } else { @@ -938,7 +938,7 @@ function buildSubjectFromSession() { $res = mysql_query($query); if(mysql_num_rows($res) <= 0) { - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); } else { $drow = mysql_fetch_assoc($res); $crt_name = escapeshellarg($drow['crt_name']); @@ -1102,7 +1102,7 @@ function buildSubjectFromSession() { $res = mysql_query($query); if(mysql_num_rows($res) <= 0) { - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); } else { printf(_("Certificate for '%s' has been renewed."), $row['CN']); echo "
\n". @@ -1656,7 +1656,7 @@ function buildSubjectFromSession() { if(mysql_num_rows($res) <= 0) { showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); showfooter(); exit; } else { @@ -1912,7 +1912,7 @@ function buildSubjectFromSession() { if(!file_exists($_SESSION['_config']['tmpfname'])) { showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); showfooter(); exit; } @@ -2010,7 +2010,7 @@ function buildSubjectFromSession() { if(mysql_num_rows($res) <= 0) { showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions.")." CSRid: $CSRid", "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions.")." CSRid: $CSRid", "", ""); showfooter(); exit; } else { @@ -2082,7 +2082,7 @@ function buildSubjectFromSession() { $res = mysql_query($query); if(mysql_num_rows($res) <= 0) { - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions.")." newid: $newid", "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions.")." newid: $newid", "", ""); } else { $drow = mysql_fetch_assoc($res); $crtname = escapeshellarg($drow['crt_name']); @@ -2892,7 +2892,7 @@ function buildSubjectFromSession() { if(mysql_num_rows($res) <= 0) { showheader(_("My CAcert.org Account!")); - printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); + printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions."), "", ""); showfooter(); exit; } else { -- 2.30.2 From 3bf254e23751d00fd7732d0d52b87a3387bf278f Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 5 May 2024 19:00:41 +0200 Subject: [PATCH 2/2] Use https links instead of http for registration --- www/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/index.php b/www/index.php index 8c5560c..d0da580 100644 --- a/www/index.php +++ b/www/index.php @@ -479,7 +479,7 @@ if ($oldid == 52 ) write_user_agreement($memid, "CCA", "account creation", "", 1); $body = _("Thanks for signing up with CAcert.org, below is the link you need to open to verify your account. Once your account is verified you will be able to start issuing certificates till your hearts' content!")."\n\n"; - $body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; + $body .= "https://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; $body .= _("Best regards")."\n"._("CAcert.org Support!"); sendmail($_SESSION['signup']['email'], "[CAcert.org] "._("Mail Probe"), $body, "support@cacert.org", "", "", "CAcert Support"); -- 2.30.2