jekyll-theme-consulting 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 606108f5aa0396efdd45e7c86cb130e6b2e178f877b427c620572206b412c60d
4
- data.tar.gz: ddfdf3ae14502e3b2d99b9fe685686e5596da4ca2125bdd6967845631a546f35
3
+ metadata.gz: 17ca15a34984ff88be827b0e3669dd7f8edcb5b94699a9eff382b513e1ff0a84
4
+ data.tar.gz: 56f338f8a0af42f63a87687790791fca07666a5aa96e65c5ab4a5e25554ddbbc
5
5
  SHA512:
6
- metadata.gz: f31332096f41bdfc8f23ee87c00b55886b8cb777f7482efc052540dfd2197aad1e2302da2d4680155d57f86b5dc3c4938a61f6cbce0a2f1613bd67f0b1c701fa
7
- data.tar.gz: 5223040f1b057537680fca1b9875f19f5d507a55f38c11a124741d451b4841fc409276b575c59ee5585ad001a65238c4b3a1765c06fb5fc4c6f055ae0358af55
6
+ metadata.gz: b92a7b6ff45e3809d5a7cbab7e279a4f5f017a0386a7ea7afd073b4eac41d2238a6bdfbf803d721d2ae8bb35c5cfeaffee5e82c942b03240506fb0c6359015f9
7
+ data.tar.gz: c4ec1fc7bdcb7e8619d542f5f97f24b1ae1d4ae6a117b87db24764c73dbe8451f23f87526f58e870b94f41f330a8f5155a8b9ce9b75661c7e833c3f8ba481ca7
@@ -1,6 +1,9 @@
1
+ ---
2
+ layout: null
3
+ ---
1
4
  <?php
2
5
 
3
- $name = $email = $message = $token = "";
6
+ $name = $email = $message = $token = $ip = "";
4
7
 
5
8
  if ($_SERVER["REQUEST_METHOD"] == "POST") {
6
9
  if (has_required_data($_POST)) {
@@ -16,11 +19,16 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
16
19
  $token = filter_var(
17
20
  $_POST["token"],
18
21
  FILTER_SANITIZE_URL);
22
+ if (filter_var(
23
+ $_SERVER['REMOTE_ADDR'],
24
+ FILTER_VALIDATE_IP)) {
25
+ $ip = $_SERVER['REMOTE_ADDR'];
26
+ }
19
27
 
20
28
  if is_recaptcha_valid($token) {
21
29
  send_mail($name, $email, $message);
22
30
  } else {
23
- send_mail($name, $email, "Is fishy.")
31
+ send_mail($name, $email, "Got a fishy request from ".$ip)
24
32
  }
25
33
  }
26
34
  }
@@ -62,8 +70,8 @@ function is_recaptcha_valid($token) {
62
70
  function send_mail ($name, $email, $message) {
63
71
  return mail(
64
72
  "{{ site.email }}",
65
- "{{ include.subject | default: 'Contact request' }}",
66
- $message,
73
+ "{{ site.subject | default: 'Contact request' }}",
74
+ $message."\r\n\nFrom: ".$name." @ ".$ip,
67
75
  "From: ".$name." <".$email.">\r\nMIME-Version: 1.0\r\nContent-type: text/html\r\n");
68
76
  }
69
77
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-consulting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moodule
@@ -79,7 +79,6 @@ files:
79
79
  - _includes/contact.html
80
80
  - _includes/contact_client_script.html
81
81
  - _includes/contact_form.html
82
- - _includes/contact_server_script.php
83
82
  - _includes/date.html
84
83
  - _includes/fact.html
85
84
  - _includes/feature.html
@@ -280,6 +279,7 @@ files:
280
279
  - assets/webfonts/fa-solid-900.ttf
281
280
  - assets/webfonts/fa-solid-900.woff
282
281
  - assets/webfonts/fa-solid-900.woff2
282
+ - contact.php
283
283
  homepage: https://github.com/moodule/jekyll-theme-consulting
284
284
  licenses:
285
285
  - CC-BY-NC-SA-4.0