Skip to content

Commit 5493a7c

Browse files
authored
Merge pull request #97 from rxu/adjust-ssl-checks
2 parents 3a21aa0 + e3ea110 commit 5493a7c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

acp/wpn_acp_module.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public function main($id, $mode)
6262
$this->lang = $phpbb_container->get('language');
6363
$this->log = $phpbb_container->get('log');
6464
$this->request = $phpbb_container->get('request');
65+
$this->symfony_request = $phpbb_container->get('symfony_request');
6566
$this->template = $phpbb_container->get('template');
6667
$this->user = $phpbb_container->get('user');
6768

@@ -106,7 +107,7 @@ public function display_settings()
106107
'U_ACTION' => $this->u_action,
107108
]);
108109

109-
if (!$this->request->server('HTTPS', false) && $this->request->server('SERVER_NAME') !== 'localhost')
110+
if (!$this->symfony_request->isSecure() && $this->request->server('SERVER_NAME') !== 'localhost')
110111
{
111112
$this->errors[] = $this->lang->lang('WEBPUSH_INSECURE_SERVER_ERROR');
112113
}

language/en/webpushnotifications_module_acp.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
'WEBPUSH_METHOD_ENABLED_EXPLAIN'=> 'When this setting is enabled, users who have also enabled and allowed browser notifications will start receiving them automatically. They can visit the UCP Notification settings to disable any unwanted notifications.<br><br>If this setting is disabled, users will not receive any notifications, even if they have enabled push notifications, until they visit the UCP Notification settings to allow the specific notifications they wish to receive.',
5151
'WEBPUSH_DROPDOWN_SUBSCRIBE' => 'Show web push settings in the notification dropdown',
5252
'WEBPUSH_DROPDOWN_SUBSCRIBE_EXPLAIN'=> 'Show or hide the “Enable Web Push” toggle switch in the notification dropdown. This allows users to easily enable or disable push notifications from any page of the forum.',
53-
'WEBPUSH_INSECURE_SERVER_ERROR' => 'This board is not using a secure SSL/HTTPS server protocol, which is required to enable and use web push notifications.',
53+
'WEBPUSH_INSECURE_SERVER_ERROR' => 'This board is not using a secure SSL/HTTPS protocol, which is required for enabling web push notifications. Alternatively, the server environment might be misconfigured. Ensure that the <em>HTTPS</em> and <em>HEADER_CLIENT_PROTO</em> server environment variables are correctly configured.',
5454
]);

language/ru/webpushnotifications_module_acp.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
'WEBPUSH_METHOD_ENABLED_EXPLAIN'=> 'Если включено, то пользователи, подписавшиеся на браузерные push—уведомления, будут автоматически получать все их типы. Если отключено, то пользователи не будут получать браузерные push—уведомления до тех пор, пока хотя бы один их тип не выбран.<br><br>Отключить нежелательные или выбрать нужные типы браузерных push—уведомлений можно в настройках уведомлений в Личном разделе.',
5151
'WEBPUSH_DROPDOWN_SUBSCRIBE' => 'Показать кнопку «Подписаться» в выпадающем меню уведомлений',
5252
'WEBPUSH_DROPDOWN_SUBSCRIBE_EXPLAIN'=> 'Включить или отключить отображение кнопки «Подписаться» в выпадающем списке уведомлений. Если включено, то пользователи смогут подписываться на браузерные push-уведомления с любой страницы конференции.',
53-
'WEBPUSH_INSECURE_SERVER_ERROR' => 'На данной конференции не применяется защищённый протокол SSL/HTTPS, без которого использование браузерных push—уведомлений невозможно.',
53+
'WEBPUSH_INSECURE_SERVER_ERROR' => 'На данной конференции не применяется защищённый протокол SSL/HTTPS, без которого использование браузерных push—уведомлений невозможно, либо соответствующие переменные серверного окружения неверно сконфигурированы. Убедитесь, что значения переменных серверного окружения <em>HTTPS</em> и/или <em>HEADER_CLIENT_PROTO</em> заданы верно.',
5454
]);

0 commit comments

Comments
 (0)