Version Description
- Fixed the "Cannot create temporary directory" error that happened on some servers where the user have no permissions to access files outside the abspath or home directory.
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.1.6 |
Comparing to | |
See all releases |
Code changes from version 2.1.5 to 2.1.6
- framework/helpers/class-fw-wp-filesystem.php +20 -21
- framework/manifest.php +1 -1
- readme.txt +4 -1
- unyson.php +1 -1
framework/helpers/class-fw-wp-filesystem.php
CHANGED
@@ -169,29 +169,28 @@ class FW_WP_Filesystem
|
|
169 |
|
170 |
$wp_filesystem_dir_path = fw_fix_path($wp_filesystem_dir_path);
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
// prevent multiple slash prefix '//var/www'
|
189 |
-
$path = '';
|
190 |
-
}
|
191 |
|
192 |
-
|
193 |
|
194 |
-
|
|
|
|
|
195 |
|
196 |
if ($check_if_exists) {
|
197 |
if ($wp_filesystem->is_dir($path)) {
|
169 |
|
170 |
$wp_filesystem_dir_path = fw_fix_path($wp_filesystem_dir_path);
|
171 |
|
172 |
+
/**
|
173 |
+
* Begin path verification starting with ABSPATH not the root '/' path.
|
174 |
+
* On servers where user has permissions only in his home directory.
|
175 |
+
* When you try to check a directory (outside home directory) that you have no permissions,
|
176 |
+
* the $wp_filesystem->is_dir($path) or $wp_filesystem->exists($path) will always return false.
|
177 |
+
*/
|
178 |
+
$path = fw_fix_path($wp_filesystem->abspath());
|
179 |
+
|
180 |
+
if (
|
181 |
+
$wp_filesystem_dir_path === $path
|
182 |
+
||
|
183 |
+
fw_strlen($wp_filesystem_dir_path) < fw_strlen($path)
|
184 |
+
) {
|
185 |
+
trigger_error('Cannot create directory outside the abspath: '. $wp_filesystem_dir_path, E_USER_WARNING);
|
186 |
+
return false;
|
187 |
+
}
|
|
|
|
|
|
|
188 |
|
189 |
+
$abs_rel_path = preg_replace('/^'. preg_quote($path, '/') .'/', '', $wp_filesystem_dir_path);
|
190 |
|
191 |
+
$check_if_exists = true;
|
192 |
+
foreach (explode('/', ltrim($abs_rel_path, '/')) as $dir_name) {
|
193 |
+
$path .= '/' . $dir_name;
|
194 |
|
195 |
if ($check_if_exists) {
|
196 |
if ($wp_filesystem->is_dir($path)) {
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.1.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.1.6';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson, themefusecom
|
|
3 |
Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.0.1
|
6 |
-
Stable tag: 2.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -84,6 +84,9 @@ Yes; Unyson will work with any theme.
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
87 |
= 2.1.5 =
|
88 |
* Added `intval()` to all `wp_remote_retrieve_response_code()`. On some servers this function returns a string instead of int and the `$code === 200` verification fails.
|
89 |
|
3 |
Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.0.1
|
6 |
+
Stable tag: 2.1.6
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 2.1.6 =
|
88 |
+
* Fixed the "Cannot create temporary directory" error that happened on some servers where the user have no permissions to access files outside the abspath or home directory.
|
89 |
+
|
90 |
= 2.1.5 =
|
91 |
* Added `intval()` to all `wp_remote_retrieve_response_code()`. On some servers this function returns a string instead of int and the `$code === 200` verification fails.
|
92 |
|
unyson.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Unyson
|
4 |
* Plugin URI: http://unyson.themefuse.com/
|
5 |
* Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|
3 |
* Plugin Name: Unyson
|
4 |
* Plugin URI: http://unyson.themefuse.com/
|
5 |
* Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
|
6 |
+
* Version: 2.1.6
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|