From 9260319ac145f11b8005c4a2e65ca27944965997 Mon Sep 17 00:00:00 2001 From: Oliver Rahner Date: Sun, 4 Sep 2016 21:27:23 +0200 Subject: [PATCH] Letsencrypt: only update registration when necessary if no Terms of Service are presented by the ACME server when registering, don't update registration --- lib/classes/ssl/class.lescript.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/classes/ssl/class.lescript.php b/lib/classes/ssl/class.lescript.php index 91256ab4..61e9f289 100644 --- a/lib/classes/ssl/class.lescript.php +++ b/lib/classes/ssl/class.lescript.php @@ -81,7 +81,10 @@ class lescript } $this->license = $this->client->getAgreementURL(); - $this->postRegAgreement(parse_url($this->client->getLastLocation(), PHP_URL_PATH)); + // Terms of Servce are optional according to ACME specs; if no ToS are presented, no need to update registration + if (!empty($this->license)) { + $this->postRegAgreement(parse_url($this->client->getLastLocation(), PHP_URL_PATH)); + } $this->log('New account certificate registered'); } else {