From 674f0a3fda3a3461ff04e60ce3129f6666ac9e37 Mon Sep 17 00:00:00 2001 From: David Miller Date: Mon, 23 Jan 2017 17:44:54 -0500 Subject: [PATCH] fix up self xss in contact form JS --- js/contact_me.js | 4 ++-- mail/contact_me.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/contact_me.js b/js/contact_me.js index c3d8ecc..9561cd1 100644 --- a/js/contact_me.js +++ b/js/contact_me.js @@ -47,7 +47,7 @@ $(function() { $('#success').html("
"); $('#success > .alert-danger').html(""); - $('#success > .alert-danger').append("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"); + $('#success > .alert-danger').append($("").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!")); $('#success > .alert-danger').append('
'); //clear all fields $('#contactForm').trigger("reset"); @@ -69,4 +69,4 @@ $(function() { /*When clicking on Full hide fail/success boxes */ $('#name').focus(function() { $('#success').html(''); -}); +}); \ No newline at end of file diff --git a/mail/contact_me.php b/mail/contact_me.php index 9770270..b8dd9eb 100644 --- a/mail/contact_me.php +++ b/mail/contact_me.php @@ -23,4 +23,4 @@ $headers = "From: noreply@yourdomain.com\n"; // This is the email address the ge $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); return true; -?> +?> \ No newline at end of file