Skip to content

Commit 7447f1d

Browse files
committed
dependency update, gettext fix, firewall update
1 parent e68fd80 commit 7447f1d

File tree

10 files changed

+1165
-1078
lines changed

10 files changed

+1165
-1078
lines changed

assets/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* PHP Microsite Boilerplate
44
* +++++++++++++++++++++++++
55
*
6-
* Version: 2.0.12
6+
* Version: 2.0.13
77
* Creator: Jens Kuerschner (https://jenskuerschner.de)
88
* Project: https://github.com/jekuer/php-microsite-boilerplate
99
* License: GNU General Public License v3.0 (gpl-3.0)

assets/css/style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// Current version of the website.
88
// Will be used to control css and js caching.
9-
$version_nr = '2.0.12';
9+
$version_nr = '2.0.13';
1010

1111
// Multilanguage
1212
$language['default'] = 'en'; // Use a key from the array below.

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* PHP Microsite Boilerplate
66
* +++++++++++++++++++++++++
77
*
8-
* Version: 2.0.12
8+
* Version: 2.0.13
99
* Creator: Jens Kuerschner (https://jenskuerschner.de)
1010
* Project: https://github.com/jekuer/php-microsite-boilerplate
1111
* License: GNU General Public License v3.0 (gpl-3.0)

lib/gettext/gettext.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@ function get_list_of_locales($locale) {
8888
if ($modifier) {
8989
if ($country) {
9090
if ($charset)
91-
array_push($locale_names, "${lang}_$country.$charset@$modifier");
92-
array_push($locale_names, "${lang}_$country@$modifier");
91+
array_push($locale_names, "{$lang}_$country.$charset@$modifier");
92+
array_push($locale_names, "{$lang}_$country@$modifier");
9393
} elseif ($charset)
94-
array_push($locale_names, "${lang}.$charset@$modifier");
94+
array_push($locale_names, "{$lang}.$charset@$modifier");
9595
array_push($locale_names, "$lang@$modifier");
9696
}
9797
if ($country) {
9898
if ($charset)
99-
array_push($locale_names, "${lang}_$country.$charset");
100-
array_push($locale_names, "${lang}_$country");
99+
array_push($locale_names, "{$lang}_$country.$charset");
100+
array_push($locale_names, "{$lang}_$country");
101101
} elseif ($charset)
102-
array_push($locale_names, "${lang}.$charset");
102+
array_push($locale_names, "{$lang}.$charset");
103103
array_push($locale_names, $lang);
104104
}
105105

nginx_conf/7g-firewall.conf

Lines changed: 114 additions & 92 deletions
Large diffs are not rendered by default.

nginx_conf/nginx.conf

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#http {
1313

1414

15-
# 7G FIREWALL - NGINX v1.4
15+
# 7G FIREWALL - NGINX v1.6
1616
include /etc/nginx/conf.d/7g-firewall.conf;
1717

1818

@@ -42,59 +42,71 @@
4242
root /home/site/wwwroot;
4343

4444

45-
# 7G FIREWALL - NGINX v1.4
46-
# @ https://perishablepress.com/7g-firewall/
45+
# 7G FIREWALL - NGINX v1.6
4746
# @ https://perishablepress.com/7g-firewall-nginx/
47+
4848
set $7g_reason "";
4949
set $7g_drop_bad_bot 0;
5050
set $7g_drop_bad_referer 0;
5151
set $7g_drop_bad_query_string 0;
5252
set $7g_drop_bad_request 0;
5353
set $7g_drop_bad_method 0;
5454
set $7g_drop 0;
55+
5556
if ($bad_bot_7g) {
5657
set $7g_reason "${7g_reason}:bad_bot_${bad_bot_7g}:";
5758
set $7g_drop_bad_bot 1;
5859
}
59-
if ($bad_referer_7g) {
60+
61+
if ($bad_referer_7g) {
6062
set $7g_reason "${7g_reason}:bad_referer_${bad_referer_7g}:";
6163
set $7g_drop_bad_referer 1;
6264
}
65+
6366
if ($bad_querystring_7g) {
6467
set $7g_reason "${7g_reason}:bad_querystring_${bad_querystring_7g}:";
6568
set $7g_drop_bad_query_string 1;
6669
}
70+
6771
if ($bad_request_7g) {
6872
set $7g_reason "${7g_reason}:bad_request_${bad_request_7g}:";
6973
set $7g_drop_bad_request 1;
7074
}
75+
7176
if ($not_allowed_method_7g) {
7277
set $7g_reason "${7g_reason}:not_allowed_method_${not_allowed_method_7g}:";
7378
set $7g_drop_bad_method 2;
7479
}
80+
7581
if ($7g_drop_bad_bot) {
7682
set $args "${7g_reason}";
7783
set $7g_drop 1;
7884
}
85+
7986
if ($7g_drop_bad_referer) {
8087
set $args "${7g_reason}";
8188
set $7g_drop 1;
8289
}
90+
8391
if ($7g_drop_bad_query_string) {
8492
set $args "${7g_reason}";
8593
set $7g_drop 1;
8694
}
95+
8796
if ($7g_drop_bad_request) {
8897
set $args "${7g_reason}";
8998
set $7g_drop 1;
9099
}
100+
91101
if ($7g_drop_bad_method) {
92102
set $args "${7g_reason}";
93103
set $7g_drop 2;
94104
}
105+
95106
if ($7g_drop = 1) {
96107
return 403;
97108
}
109+
98110
if ($7g_drop = 2) {
99111
return 405;
100112
}

0 commit comments

Comments
 (0)