summaryrefslogtreecommitdiff
path: root/Postman/Postman-Connectivity-Test
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-08-26 13:21:06 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-08-26 13:21:06 +0000
commitaeb5cf0276bb7b658997281ba34abf6e69fe17bb (patch)
tree16a8f22e32115fced2607535ae99613fe2e6fa14 /Postman/Postman-Connectivity-Test
parent59be4e796441e494f25b18ece7438dbf02442e47 (diff)
downloadPost-SMTP-aeb5cf0276bb7b658997281ba34abf6e69fe17bb.zip
security + bugs
Diffstat (limited to 'Postman/Postman-Connectivity-Test')
-rw-r--r--Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php10
-rw-r--r--Postman/Postman-Connectivity-Test/postman_port_test.js4
2 files changed, 12 insertions, 2 deletions
diff --git a/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php b/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php
index 3e17dbd..6ff5a69 100644
--- a/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php
+++ b/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php
@@ -98,6 +98,14 @@ class PostmanConnectivityTestController {
wp_enqueue_script( 'postman_port_test_script' );
$warning = __( 'Warning', 'post-smtp' );
wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_hostname_element_name', '#input_' . PostmanOptions::HOSTNAME );
+ wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_email_test', array(
+ 'recipient' => '#' . PostmanSendTestEmailController::RECIPIENT_EMAIL_FIELD_NAME,
+ 'not_started' => _x( 'In Outbox', 'Email Test Status', 'post-smtp' ),
+ 'sending' => _x( 'Sending...', 'Email Test Status', 'post-smtp' ),
+ 'success' => _x( 'Success', 'Email Test Status', 'post-smtp' ),
+ 'failed' => _x( 'Failed', 'Email Test Status', 'post-smtp' ),
+ 'ajax_error' => __( 'Ajax Error', 'post-smtp' ),
+ ) );
PostmanConnectivityTestController::addLocalizeScriptForPortTest();
}
static function addLocalizeScriptForPortTest() {
@@ -135,6 +143,8 @@ class PostmanConnectivityTestController {
public function outputPortTestContent() {
print '<div class="wrap">';
+ wp_nonce_field('post-smtp', 'security');
+
PostmanViewController::outputChildPageHeader( __( 'Connectivity Test', 'post-smtp' ) );
print '<p>';
diff --git a/Postman/Postman-Connectivity-Test/postman_port_test.js b/Postman/Postman-Connectivity-Test/postman_port_test.js
index 1d5c3fb..8667c06 100644
--- a/Postman/Postman-Connectivity-Test/postman_port_test.js
+++ b/Postman/Postman-Connectivity-Test/postman_port_test.js
@@ -73,7 +73,7 @@ function portQuizTest(socket, hostname, port) {
'action' : 'postman_port_quiz_test',
'hostname' : hostname,
'port' : port,
- '_wpnonce' : jQuery('#_wpnonce').val(),
+ 'security' : jQuery('#security').val(),
};
jQuery.post(
ajaxurl,
@@ -201,7 +201,7 @@ function portTest3(socket, hostname, port, open) {
'action' : 'postman_test_smtps',
'hostname' : hostname,
'port' : port,
- '_wpnonce' : jQuery('#_wpnonce').val(),
+ 'security' : jQuery('#security').val(),
};
jQuery
.post(