Messages : 6
Sujets : 1
Inscription : Dec 2012
Réputation :
0
Hi,
Here is my quick and dirty fix for the imagemanager in the deletion problem (the 1.11.3 did not fix my problem).
The fix
in lib/FileManager/imagemanager/Classes/ImageManager.php
Line 373
Replace
with
Code : if($key == $path || $key == $path."/")
The problem seems to be in the verification of relative path in line if( !$this->validRelativePath($r2) ) return false;
The getDirskeys have "/" at the end but the $r2 not and the compare return false...
Messages : 6
Sujets : 1
Inscription : Dec 2012
Réputation :
0
Hi,
Here is my quick and dirty fix for the imagemanager in the deletion problem (the 1.11.3 did not fix my problem).
The fix
in lib/FileManager/imagemanager/Classes/ImageManager.php
Line 373
Replace
with
Code : if($key == $path || $key == $path."/")
The problem seems to be in the verification of relative path in line if( !$this->validRelativePath($r2) ) return false;
The getDirskeys have "/" at the end but the $r2 not and the compare return false...
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
This did not fix the problem for me
But Ok for
The problem seems to be in the verification of relative path in line if( !$this->validRelativePath($r2) ) return false;
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
This did not fix the problem for me
But Ok for
The problem seems to be in the verification of relative path in line if( !$this->validRelativePath($r2) ) return false;
Messages : 8,242
Sujets : 58
Inscription : Dec 2007
Réputation :
0
05/12/2012, 13:53:15
(Modification du message : 05/12/2012, 13:55:16 par Jean le Chauve.)
This cannot fix because we have if($path == '/') return true; in line 365
$path.'/' -> //
Messages : 8,242
Sujets : 58
Inscription : Dec 2007
Réputation :
0
05/12/2012, 13:53:15
(Modification du message : 05/12/2012, 13:55:16 par Jean le Chauve.)
This cannot fix because we have if($path == '/') return true; in line 365
$path.'/' -> //
Messages : 6
Sujets : 1
Inscription : Dec 2012
Réputation :
0
For your information.
Here is my complete validRelativePath method. Which solve the problem on my 1.11.3 install
Code : function validRelativePath($path)
{
$dirs = $this->getDirs();
if($path == '/')
Return true;
//check the path given in the url against the
//list of paths in the system.
for($i = 0; $i < count($dirs); $i++)
{
$key = key($dirs);
//we found the path
if($key == $path || $key == $path."/")
Return true;
next($dirs);
}
Return false;
}
The condition if($path == '/') is only for the root folder management. The code below this instruction manage all subfolders.
Regards,
Messages : 6
Sujets : 1
Inscription : Dec 2012
Réputation :
0
For your information.
Here is my complete validRelativePath method. Which solve the problem on my 1.11.3 install
Code : function validRelativePath($path)
{
$dirs = $this->getDirs();
if($path == '/')
Return true;
//check the path given in the url against the
//list of paths in the system.
for($i = 0; $i < count($dirs); $i++)
{
$key = key($dirs);
//we found the path
if($key == $path || $key == $path."/")
Return true;
next($dirs);
}
Return false;
}
The condition if($path == '/') is only for the root folder management. The code below this instruction manage all subfolders.
Regards,
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
fix the problem for me...thanks
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
fix the problem for me...thanks
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
@ n00pX90
This did not fix the problem for me -> I use the SVN 8542
with WAMP windows
so are you using
- the last SVN rev 8542 ?
- or the official 1.11.3 ?
@ jissey tu es sur quelle version la 1.11.3 ou la SVN ??
il y a eu des modification entre la 1.11.3 et SVN rev 8542 sur imagemanager
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
@ n00pX90
This did not fix the problem for me -> I use the SVN 8542
with WAMP windows
so are you using
- the last SVN rev 8542 ?
- or the official 1.11.3 ?
@ jissey tu es sur quelle version la 1.11.3 ou la SVN ??
il y a eu des modification entre la 1.11.3 et SVN rev 8542 sur imagemanager
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
1.11.3 mise à jour 1.11.4 “Fernandina_8509Fr”
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
1.11.3 mise à jour 1.11.4 “Fernandina_8509Fr”
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Code : [== Indéfini ==]
1.11.3 mise à jour 1.11.4 “Fernandina_8509Fr”
sous WAMP ??
j'ai tester un 1.11.3 suus Wamp ça ne marche pas non plus le patch
il s'agit bien de supprimer les images du dossier /images uniquement
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Code : [== Indéfini ==]
1.11.3 mise à jour 1.11.4 “Fernandina_8509Fr”
sous WAMP ??
j'ai tester un 1.11.3 suus Wamp ça ne marche pas non plus le patch
il s'agit bien de supprimer les images du dossier /images uniquement
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
chez OVH mutu.
----------------------------------------------
Cms Version: 1.11.4
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.3
FileManager: 1.4.2
MenuManager: 1.8.4
MicroTiny: 1.2.4
ModuleManager: 1.5.5
News: 2.12.10
Search: 1.7.7
ThemeManager: 1.1.7
Gallery: 1.6
Archiver: 0.2.6
BackupMySql: 0.3.1
UsersGuide: 1.5
Config Information:
php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 64000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.3.16
md5_function: On (Vrai)
gd_version: 2
tempnam_function: On (Vrai)
magic_quotes_runtime: Off (Faux)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 120
output_buffering: 4096
safe_mode: Off (Faux)
file_uploads: On (Vrai)
post_max_size: 64M
upload_max_filesize: 64M
session_save_path: /tmp (1777)
session_use_cookies: On (Vrai)
xml_function: On (Vrai)
xmlreader_class: On (Vrai)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.63
Server Db Grants: Impossible de trouver un privilège "GRANT ALL". Cela peut signifier que vous pourriez avoir des problèmes pour installer ou retirer des modules, ou encore l 'ajout et la suppression d'éléments, y compris les pages.
----------------------------------------------
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
chez OVH mutu.
----------------------------------------------
Cms Version: 1.11.4
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.3
FileManager: 1.4.2
MenuManager: 1.8.4
MicroTiny: 1.2.4
ModuleManager: 1.5.5
News: 2.12.10
Search: 1.7.7
ThemeManager: 1.1.7
Gallery: 1.6
Archiver: 0.2.6
BackupMySql: 0.3.1
UsersGuide: 1.5
Config Information:
php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 64000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.3.16
md5_function: On (Vrai)
gd_version: 2
tempnam_function: On (Vrai)
magic_quotes_runtime: Off (Faux)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 120
output_buffering: 4096
safe_mode: Off (Faux)
file_uploads: On (Vrai)
post_max_size: 64M
upload_max_filesize: 64M
session_save_path: /tmp (1777)
session_use_cookies: On (Vrai)
xml_function: On (Vrai)
xmlreader_class: On (Vrai)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.63
Server Db Grants: Impossible de trouver un privilège "GRANT ALL". Cela peut signifier que vous pourriez avoir des problèmes pour installer ou retirer des modules, ou encore l 'ajout et la suppression d'éléments, y compris les pages.
----------------------------------------------
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Code : [== Indéfini ==]
chez OVH mutu.
Sous Windows ?? quelle version ??
cela voudrait dire que le problème se situe uniquement sur les systèmes WAMP sous Windows local
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Code : [== Indéfini ==]
chez OVH mutu.
Sous Windows ?? quelle version ??
cela voudrait dire que le problème se situe uniquement sur les systèmes WAMP sous Windows local
Messages : 6
Sujets : 1
Inscription : Dec 2012
Réputation :
0
I use the stable release 1.11.3 not the SVN version.
And i'm on a Linux shared host.
To debug on WAMP, you can echoing the $path and $dirs array then compare the differences in the result.
Do something like this after $dirs = $this->getDirs();
Code : $dirs = $this->getDirs();
echo "This is my real path".$path."<br>";
echo "<pre>";
print_r($dirs);
echo "</pre>";
...
Messages : 6
Sujets : 1
Inscription : Dec 2012
Réputation :
0
I use the stable release 1.11.3 not the SVN version.
And i'm on a Linux shared host.
To debug on WAMP, you can echoing the $path and $dirs array then compare the differences in the result.
Do something like this after $dirs = $this->getDirs();
Code : $dirs = $this->getDirs();
echo "This is my real path".$path."<br>";
echo "<pre>";
print_r($dirs);
echo "</pre>";
...
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Citation :I use the stable release 1.11.3 not the SVN version.
And i'm on a Linux shared host.
Ok some modifications are on the last SVN (next 1.11.4)
On linux with the last SVN all is OK from ImageManager
So
The bug is NOT on Linux but only on windows
* There is a problem with deleting images in ImageManager in Windows
http://dev.cmsmadesimple.org/bug/view/8673
see http://www.cmsmadesimple.fr/forum/viewtopic.php?id=4772
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Citation :I use the stable release 1.11.3 not the SVN version.
And i'm on a Linux shared host.
Ok some modifications are on the last SVN (next 1.11.4)
On linux with the last SVN all is OK from ImageManager
So
The bug is NOT on Linux but only on windows
* There is a problem with deleting images in ImageManager in Windows
http://dev.cmsmadesimple.org/bug/view/8673
see http://www.cmsmadesimple.fr/forum/viewtopic.php?id=4772
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
OVH mutu=linux
j'avais ce problème sous Linux.
En local avec Wamp, je viens de tester sur 1.11.3 “Darwin” : erreur. => Corrigée avec la solution de n00pX90.
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
OVH mutu=linux
j'avais ce problème sous Linux.
En local avec Wamp, je viens de tester sur 1.11.3 “Darwin” : erreur. => Corrigée avec la solution de n00pX90.
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Citation :j'avais ce problème sous Linux.
Oui mais le problème est uniquement sur la future 1.11.4 (actuellement SVN) et que Sous Windows Et que sous /images pas dans les sous dossiers de/images
ben non pour moi ça marche pas
c'est le même résultat que Jean
echo $path; \/ donc erreur
Il y a des \ et / qui se croisent et plante la suppression
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Citation :j'avais ce problème sous Linux.
Oui mais le problème est uniquement sur la future 1.11.4 (actuellement SVN) et que Sous Windows Et que sous /images pas dans les sous dossiers de/images
ben non pour moi ça marche pas
c'est le même résultat que Jean
echo $path; \/ donc erreur
Il y a des \ et / qui se croisent et plante la suppression
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
je récapitule :
Sous Linux avec ta 1.11.4
Sous Windaube avec la 1.11.3 officielle.
Messages : 5,034
Sujets : 63
Inscription : Oct 2009
Réputation :
0
je récapitule :
Sous Linux avec ta 1.11.4
Sous Windaube avec la 1.11.3 officielle.
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Proposition à tester sous Win et linux
dans \ImageManager\Classes\ImageManager.php
function validRelativePath($path)
- if($path == '/') return true;// a supprimer
+ if($path == '/' || $path.'\/') return true; // Nouvelle ligne
Merci du retour
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Proposition à tester sous Win et linux
dans \ImageManager\Classes\ImageManager.php
function validRelativePath($path)
- if($path == '/') return true;// a supprimer
+ if($path == '/' || $path.'\/') return true; // Nouvelle ligne
Merci du retour
Messages : 8,242
Sujets : 58
Inscription : Dec 2007
Réputation :
0
Messages : 8,242
Sujets : 58
Inscription : Dec 2007
Réputation :
0
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
Messages : 10,987
Sujets : 230
Inscription : Sep 2007
Réputation :
1
|