Version Description
- Fix: Prevent collision with other plugins when authenticating AJAX-calls.
Download this release
Release Info
Developer | DaanvandenBergh |
Plugin | OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. |
Version | 4.5.5 |
Comparing to | |
See all releases |
Code changes from version 4.5.4 to 4.5.5
- host-webfonts-local.php +1 -1
- includes/class-ajax.php +4 -4
- readme.txt +4 -1
host-webfonts-local.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: OMGF
|
5 |
* Plugin URI: https://daan.dev/wordpress-plugins/host-google-fonts-locally
|
6 |
* Description: Minimize DNS requests, leverage browser cache and speed up WordPress by saving Google Fonts to your server and removing external Google Fonts requests.
|
7 |
-
* Version: 4.5.
|
8 |
* Author: Daan from FFW.Press
|
9 |
* Author URI: https://ffw.press
|
10 |
* License: GPL2v2 or later
|
4 |
* Plugin Name: OMGF
|
5 |
* Plugin URI: https://daan.dev/wordpress-plugins/host-google-fonts-locally
|
6 |
* Description: Minimize DNS requests, leverage browser cache and speed up WordPress by saving Google Fonts to your server and removing external Google Fonts requests.
|
7 |
+
* Version: 4.5.5
|
8 |
* Author: Daan from FFW.Press
|
9 |
* Author URI: https://ffw.press
|
10 |
* License: GPL2v2 or later
|
includes/class-ajax.php
CHANGED
@@ -26,10 +26,6 @@ class OMGF_AJAX
|
|
26 |
*/
|
27 |
public function __construct()
|
28 |
{
|
29 |
-
if (!current_user_can('manage_options')) {
|
30 |
-
wp_die(__("You're not cool enough to access this page.", $this->plugin_text_domain));
|
31 |
-
}
|
32 |
-
|
33 |
add_action('wp_ajax_omgf_ajax_empty_dir', [$this, 'empty_directory']);
|
34 |
}
|
35 |
|
@@ -42,6 +38,10 @@ class OMGF_AJAX
|
|
42 |
{
|
43 |
check_ajax_referer(OMGF_Admin_Settings::OMGF_ADMIN_PAGE, 'nonce');
|
44 |
|
|
|
|
|
|
|
|
|
45 |
$section = str_replace('*', '', $_POST['section']);
|
46 |
$set_path = rtrim(OMGF_FONTS_DIR . $section, '/');
|
47 |
$resolved_path = realpath(OMGF_FONTS_DIR . $section);
|
26 |
*/
|
27 |
public function __construct()
|
28 |
{
|
|
|
|
|
|
|
|
|
29 |
add_action('wp_ajax_omgf_ajax_empty_dir', [$this, 'empty_directory']);
|
30 |
}
|
31 |
|
38 |
{
|
39 |
check_ajax_referer(OMGF_Admin_Settings::OMGF_ADMIN_PAGE, 'nonce');
|
40 |
|
41 |
+
if (!current_user_can('manage_options')) {
|
42 |
+
wp_die(__("You're not cool enough to access this page.", $this->plugin_text_domain));
|
43 |
+
}
|
44 |
+
|
45 |
$section = str_replace('*', '', $_POST['section']);
|
46 |
$set_path = rtrim(OMGF_FONTS_DIR . $section, '/');
|
47 |
$resolved_path = realpath(OMGF_FONTS_DIR . $section);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: DaanvandenBergh
|
|
3 |
Tags: google, fonts, gdpr, cache, speed, preload, font-display, webfonts, subsets, remove, minimize, external, requests
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 4.5.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -132,6 +132,9 @@ No, not yet. But I will definitely try to make it compatible in the future!
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
135 |
= 4.5.4 | August 18th, 2021 =
|
136 |
* Security: Access to the Download API now requires a valid nonce to prevent CSRF.
|
137 |
* Security: Added authentication to Empty Cache Directory AJAX-call.
|
3 |
Tags: google, fonts, gdpr, cache, speed, preload, font-display, webfonts, subsets, remove, minimize, external, requests
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 4.5.5
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 4.5.5 =
|
136 |
+
* Fix: Prevent collision with other plugins when authenticating AJAX-calls.
|
137 |
+
|
138 |
= 4.5.4 | August 18th, 2021 =
|
139 |
* Security: Access to the Download API now requires a valid nonce to prevent CSRF.
|
140 |
* Security: Added authentication to Empty Cache Directory AJAX-call.
|