Skip to content

Commit

Permalink
Merge pull request #251 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Deploy 2022-07-11
  • Loading branch information
attiks authored Jul 11, 2022
2 parents 6568d8f + f342985 commit 192ab3d
Show file tree
Hide file tree
Showing 27 changed files with 740 additions and 584 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@
All notable changes to this project will be documented in this file.
<!--- END HEADER -->

## [0.0.6](https://github.com/operations-site/compare/v0.0.5...v0.0.6) (2022-07-11)
### Features

* Allow global editor to translate interface ([28b27f](https://github.com/operations-site/commit/28b27f2959dd6d12156b468687156b9011353943))
* Alternate source for events [#RWR-160](https://https://humanitarian.atlassian.net/browse/RWR-160) ([4b4a30](https://github.com/operations-site/commit/4b4a30f8a51e927dca47a797ff7cb931b6a03b16))
* Mark external tabs as being external [#RWR-160](https://https://humanitarian.atlassian.net/browse/RWR-160) ([58f09b](https://github.com/operations-site/commit/58f09b8ae1a74b6607da99043595665d57a628cc))
* Multilingual breadcrumbs [#RWR-157](https://https://humanitarian.atlassian.net/browse/RWR-157) ([c920c1](https://github.com/operations-site/commit/c920c19dfecfb59103f8de6f2f5a1d7f22329b12))
* Multilingual menus [#RWR-157](https://https://humanitarian.atlassian.net/browse/RWR-157) ([631aae](https://github.com/operations-site/commit/631aae601f3edb4246cf455d40354ed83be63101))
* Multilingual tabs [#RWR-157](https://https://humanitarian.atlassian.net/browse/RWR-157) ([b7c389](https://github.com/operations-site/commit/b7c38992bbadac12ab7d38637565ce987a440102))

### Bug Fixes

* Auto update failed on patch, so updated manually ([3ad632](https://github.com/operations-site/commit/3ad632700129c9cb6c67382b336484084aaaa22b))
* Remove divs around description list items so the intended layout takes effect ([4e5c74](https://github.com/operations-site/commit/4e5c7484717d00920b350ee0c399898a9829353d))

### Chores

* Debug failing test ([a351bb](https://github.com/operations-site/commit/a351bb2e30f73cae2f8acc1dcc2ee29bf30319c5))

## [0.0.4](https://github.com/operations-site/compare/v0.0.3...v0.0.4) (2022-06-07)
### Features

Expand Down
File renamed without changes.
43 changes: 23 additions & 20 deletions patches/mysql-ssl-status.patch → PATCHES/mysql-ssl-status.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
index 5585ae0c54..202235e6c1 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
@@ -74,6 +74,15 @@ class Connection extends DatabaseConnection {
diff --git a/core/modules/mysql/src/Driver/Database/mysql/Connection.php b/core/modules/mysql/src/Driver/Database/mysql/Connection.php
index 4fbb2221ee..abd53121e0 100644
--- a/core/modules/mysql/src/Driver/Database/mysql/Connection.php
+++ b/core/modules/mysql/src/Driver/Database/mysql/Connection.php
@@ -73,6 +73,15 @@ class Connection extends DatabaseConnection {
*/
private $serverVersion;

Expand All @@ -11,28 +11,28 @@ index 5585ae0c54..202235e6c1 100644
+ *
+ * @var string
+ *
+ * @see \Drupal\Core\Database\Driver\mysql\Connection::connection
+ * @see \Drupal\Core\Database\Driver\mysql\Connection::connectionInfo
+ */
+ private $serverConnection;
+ private $serverConnectionInfo;
+
/**
* The minimal possible value for the max_allowed_packet setting of MySQL.
*
@@ -264,6 +273,13 @@ public function version() {
@@ -272,6 +281,13 @@ public function version() {
return $this->getServerVersion();
}

+ /**
+ * {@inheritdoc}
+ */
+ public function connection() {
+ return $this->getServerConnection();
+ public function connectionInfo() {
+ return $this->getServerConnectionInfo();
+ }
+
/**
* Determines whether the MySQL distribution is MariaDB or not.
*
@@ -303,6 +319,19 @@ protected function getServerVersion(): string {
@@ -311,6 +327,19 @@ protected function getServerVersion(): string {
return $this->serverVersion;
}

Expand All @@ -42,32 +42,35 @@ index 5585ae0c54..202235e6c1 100644
+ * @return string
+ * The session SSL_CIPHER information.
+ */
+ protected function getServerConnection(): string {
+ if (!$this->serverConnection) {
+ $this->serverConnection = $this->connection->query("SHOW SESSION STATUS LIKE 'SSL_CIPHER'")->fetchColumn(1);
+ protected function getServerConnectionInfo(): string {
+ if (!$this->serverConnectionInfo) {
+ $this->serverConnectionInfo = $this->connection->query("SHOW SESSION STATUS LIKE 'SSL_CIPHER'")->fetchColumn(1);
+ }
+ return $this->serverConnection;
+ return $this->serverConnectionInfo;
+ }
+
public function databaseType() {
return 'mysql';
}
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 57119b8691..f7594fb01f 100644
index 7339468a92..54a4f729f1 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -443,7 +443,14 @@ function system_requirements($phase) {
@@ -531,8 +531,17 @@ function system_requirements($phase) {
$requirements['database_system_version'] = [
'title' => t('Database system version'),
'value' => Database::getConnection()->version(),
+ 'description' => t('Connection is not encrypted.'),
];
+ if (Database::getConnection()->connection()) {
+ $requirements['database_system_version']['description'] = t('Connection is encrypted with %connection.', ['%connection' => Database::getConnection()->connection() ]);

+ // Check whether the database connection is encrypted and adjust the requirements array based on findings.
+ if (Database::getConnection()->connectionInfo()) {
+ $requirements['database_system_version']['description'] = t('Connection is encrypted with %connection.', ['%connection' => Database::getConnection()->connectionInfo() ]);
+ }
+ else {
+ $requirements['database_system_version']['severity'] = REQUIREMENT_WARNING;
+ }
+
$errors = $tasks->engineVersionRequirementsCheck();
$error_count = count($errors);
if ($error_count > 0) {
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ git push origin $today-prep-release

Merge to dev, [create PR to merge to main](https://github.com/UN-OCHA/response-site/compare/main...develop)

Merge to main, [Tag a new release](gh_release)
Merge to main, [Tag a new release](./gh_release)

### Commit messages

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,5 @@
"phpunit/phpunit": "^9.5",
"weitzman/drupal-test-traits": "^1.5"
},
"version": "0.0.4"
"version": "0.0.6"
}
Loading

0 comments on commit 192ab3d

Please sign in to comment.