Skip to content

Add warning for ssl off directive during Cerbox setup #431

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/de/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Kommentiere ${common.ssl}-relevante Direktiven in deiner Konfiguration aus:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `Führe einen reload deines ${common.nginx} Server aus:`,
obtainSslCertificatesFromLetsEncrypt: `Erhalte ${common.ssl} Zertifikate von ${common.letsEncrypt} mittels ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Kommentiere ${common.ssl}-relevante Direktiven in deiner Konfiguration ein:`,
Expand Down
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/en/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Comment out ${common.ssl} related directives in the configuration:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`,
reloadYourNginxServer: `Reload your ${common.nginx} server:`,
obtainSslCertificatesFromLetsEncrypt: `Obtain ${common.ssl} certificates from ${common.letsEncrypt} using ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Uncomment ${common.ssl} related directives in the configuration:`,
Expand Down
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/es/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Comente las directivas relacionadas con ${common.ssl} en la configuración:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `Recargar el ${common.nginx}:`,
obtainSslCertificatesFromLetsEncrypt: `Obtenga los certificados ${common.ssl} de ${common.letsEncrypt} usando ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Comente las directivas relacionadas con ${common.ssl} en la configuración:`,
Expand Down
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/fr/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Commentez les directives relatives à ${common.ssl}:`,
sslOffDeprecationWarning: `Cette commande ajoutera une directive temporaire <code class="slim">ssl off</code> pour s'assurer que les directives ${common.ssl} ne sont pas actives. Cela peut amener ${common.nginx} à émettre un avertissement, qui peut être ignoré en toute sécurité. La directive sera supprimée une fois que ${certbot} sera configuré.`,
reloadYourNginxServer: `Relancez le serveur ${common.nginx}:`,
obtainSslCertificatesFromLetsEncrypt: `Obtenez les certificats ${common.ssl} de ${common.letsEncrypt} à l'aide de ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Décommentez les directives relatives à ${common.ssl}:`,
Expand Down
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/ja/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `設定中の ${common.ssl} 関連ディレクティブをコメントアウトします:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `${common.nginx} サーバをリロードします:`,
obtainSslCertificatesFromLetsEncrypt: `${certbot} を利用して、 ${common.ssl} 証明書を ${common.letsEncrypt} から取得します:`,
uncommentSslDirectivesInConfiguration: `設定中の ${common.ssl} 関連ディレクティブのコメントアウトを外します:`,
Expand Down
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/pl/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Zakomentuj dyrektywy związane z ${common.ssl} w pliku konfiguracyjnym:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `Przeładuj usługę ${common.nginx}:`,
obtainSslCertificatesFromLetsEncrypt: `Uzysjak certyfikat ${common.ssl} od ${common.letsEncrypt} za pomocą ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Odkomentuj dyrektywy związane z ${common.ssl} w pliku konfiguracyjnym:`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Comente as diretivas relacionadas ao ${common.ssl} na configuração:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `Recarregue seu servidor ${common.nginx}:`,
obtainSslCertificatesFromLetsEncrypt: `Obtenha certificados ${common.ssl} de ${common.letsEncrypt} usando o ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Descomente as diretivas relacionadas ao ${common.ssl} na configuração:`,
Expand Down
3 changes: 2 additions & 1 deletion src/nginxconfig/i18n/ru/templates/setup_sections/certbot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `Закомментируйте директивы, связанные с ${common.ssl} в конфигурации:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `Перезагрузите свой ${common.nginx} сервер:`,
obtainSslCertificatesFromLetsEncrypt: `Получите ${common.ssl} сертификат ${common.letsEncrypt} используя ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Раскомментируйте директивы, связанные с ${common.ssl} в конфигурации:`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `注释掉配置中的${common.ssl}相关指令:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `重新加载你的${common.nginx}服务器:`,
obtainSslCertificatesFromLetsEncrypt: `使用${certbot}从 ${common.letsEncrypt} 获得${common.ssl}证书:`,
uncommentSslDirectivesInConfiguration: `在配置中取消注释${common.ssl}相关指令:`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,7 @@ const certbot = 'Certbot';

export default {
commentOutSslDirectivesInConfiguration: `註解掉設定中的 ${common.ssl} 相關指令:`,
sslOffDeprecationWarning: `This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate
reloadYourNginxServer: `重新載入您的 ${common.nginx} 伺服器:`,
obtainSslCertificatesFromLetsEncrypt: `使用 ${certbot} 從 ${common.letsEncrypt} 取得 ${common.ssl} 憑證:`,
uncommentSslDirectivesInConfiguration: `在設定中取消註解 ${common.ssl} 相關指令:`,
Expand Down
18 changes: 17 additions & 1 deletion src/nginxconfig/scss/_code.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -63,6 +63,22 @@ pre {
.code-toolbar {
> .toolbar {
right: calc(.2em + 16px);

> .toolbar-item {
> button {
background: rgba($input, .9);
border: 1px solid $input-border;
color: rgba($input-border, .75);
cursor: pointer;
transition: color $transition, background $transition;

&:hover,
&:focus {
background: $input;
color: $input-border;
}
}
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/nginxconfig/templates/domain_sections/presets.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2022 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -35,9 +35,9 @@ THE SOFTWARE.

<template v-if="!$parent.$props.data.hasUserInteraction || expanded">
<div v-if="$parent.$props.data.hasUserInteraction" class="message is-warning">
<div class="message-body">
<p class="message-body">
{{ $t('templates.domainSections.presets.itLooksLikeYouCustomisedTheConfig') }}
</div>
</p>
</div>

<div class="buttons-group">
Expand Down
4 changes: 2 additions & 2 deletions src/nginxconfig/templates/global_sections/security.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2022 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -62,7 +62,7 @@ THE SOFTWARE.
<span
class="message-body"
v-html="$t('templates.globalSections.security.whenUsingWordPressUnsafeEvalIsOftenRequiredToAllowFunctionality')"
></span>
/>
</label>
</div>
</div>
Expand Down
9 changes: 8 additions & 1 deletion src/nginxconfig/templates/setup_sections/certbot.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2022 DigitalOcean
Copyright 2023 DigitalOcean

This code is licensed under the MIT License.
You may obtain a copy of the License at
Expand Down Expand Up @@ -37,6 +37,13 @@ THE SOFTWARE.
:cmd="`sed -i -r 's/(listen .*443)/\\1; #/g; s/(ssl_(certificate|certificate_key|trusted_certificate) )/#;#\\1/g; s/(server \\{)/\\1\\n ssl off;/g' ${sitesAvailable}`"
@copied="codeCopiedEvent('Disable ssl directives')"
></BashPrism>

<div class="text message is-warning">
<p
class="message-body"
v-html="$t('templates.setupSections.certbot.sslOffDeprecationWarning')"
/>
</div>
</li>

<li>
Expand Down