From b09a9b203cd0c167e58584bba0ebb3b1b3da2b15 Mon Sep 17 00:00:00 2001 From: Yogesh Beniwal <7325107+yogeshbeniwal@users.noreply.github.com> Date: Wed, 11 May 2022 21:57:38 +0800 Subject: [PATCH 1/3] Update Referrer-Policy --- wo/cli/templates/nginx-core.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/templates/nginx-core.mustache b/wo/cli/templates/nginx-core.mustache index 4ce92dc..1c0bb89 100644 --- a/wo/cli/templates/nginx-core.mustache +++ b/wo/cli/templates/nginx-core.mustache @@ -68,7 +68,7 @@ http { more_set_headers "X-Frame-Options : SAMEORIGIN"; more_set_headers "X-Xss-Protection : 1; mode=block"; more_set_headers "X-Content-Type-Options : nosniff"; - more_set_headers "Referrer-Policy : no-referrer, strict-origin-when-cross-origin"; + more_set_headers "Referrer-Policy : strict-origin-when-cross-origin"; more_set_headers "X-Download-Options : noopen"; # oscp settings From 3c15940f4e009eb2526986fafec15e5ec55dcc3b Mon Sep 17 00:00:00 2001 From: Hamada Habib <24924319+ihfbib@users.noreply.github.com> Date: Sat, 28 May 2022 04:35:37 +0200 Subject: [PATCH 2/3] fix obsolete warnings logged --- wo/cli/templates/tweaks.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wo/cli/templates/tweaks.mustache b/wo/cli/templates/tweaks.mustache index 2912372..8e16422 100644 --- a/wo/cli/templates/tweaks.mustache +++ b/wo/cli/templates/tweaks.mustache @@ -1,8 +1,8 @@ # NGINX Tweaks - WordOps {{release}} directio 4m; directio_alignment 512; - http2_max_field_size 16k; - http2_max_header_size 32k; + #http2_max_field_size 16k; + #http2_max_header_size 32k; large_client_header_buffers 8 64k; From cdbdf2cc22e54a183ad6c12e60a00256b3c31629 Mon Sep 17 00:00:00 2001 From: Hamada Habib <24924319+ihfbib@users.noreply.github.com> Date: Tue, 12 Jul 2022 08:33:01 +0200 Subject: [PATCH 3/3] Update distro.linux_distribution & mariadb_ver [10.8] Fix: DeprecationWarning: distro.linux_distribution() is deprecated Deprecated since version 3.5, removed in version 3.7. Update: OVH MariaDB mirror has been updated and support Ubuntu 22.04 [jammy] --- wo/core/variables.py | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/wo/core/variables.py b/wo/core/variables.py index 8066caa..1bf5f9e 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -1,12 +1,13 @@ """WordOps core variable module""" import configparser import os +import sys from datetime import datetime from re import match from socket import getfqdn from shutil import copy2 -from distro import linux_distribution +from distro import distro, linux_distribution from sh import git @@ -30,13 +31,19 @@ class WOVar(): # WordOps core variables # linux distribution - wo_distro = linux_distribution( - full_distribution_name=False)[0].lower() - wo_platform_version = linux_distribution( - full_distribution_name=False)[1].lower() - # distro codename (bionic, xenial, stretch ...) - wo_platform_codename = linux_distribution( - full_distribution_name=False)[2].lower() + if sys.version_info <= (3, 7): + wo_distro = linux_distribution( + full_distribution_name=False)[0].lower() + wo_platform_version = linux_distribution( + full_distribution_name=False)[1].lower() + # distro codename (bionic, xenial, stretch ...) + wo_platform_codename = linux_distribution( + full_distribution_name=False)[2].lower() + else: + wo_distro = distro.id() + wo_platform_version = distro.version() + # distro codename (bionic, xenial, stretch ...) + wo_platform_codename = distro.codename() # Get timezone of system if os.path.isfile('/etc/timezone'): @@ -171,7 +178,10 @@ class WOVar(): else: mariadb_ver = '10.3' else: - mariadb_ver = '10.5' + if wo_platform_codename == 'jammy': + mariadb_ver = '10.8' + else: + mariadb_ver = '10.5' wo_mysql = wo_mysql + ["mariadb-backup"] wo_mysql_client = ["mariadb-client", "python3-mysqldb"] @@ -183,8 +193,9 @@ class WOVar(): # APT repositories wo_mysql_repo = ("deb [arch=amd64,arm64,ppc64el] " "http://mariadb.mirrors.ovh.net/MariaDB/repo/" - "10.5/{distro} {codename} main" - .format(distro=wo_distro, + "{version}/{distro} {codename} main" + .format(version=mariadb_ver, + distro=wo_distro, codename=wo_platform_codename)) if wo_distro == 'ubuntu': wo_php_repo = "ppa:ondrej/php"