News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Multiple Dot's are replaced with Spaces - [Fixed in 3.2.11 !!!]

Started by NemesisRE, 11.08.2014 14:08:57

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NemesisRE

I have a File named "Bootmenu_v0.8.6-v2.zip" and monitoring is enabled or I use the "Check download area" function this file will be rewritten to "Bootmenu_v0 8 6-v2.zip"

This is fatal in two ways:
1. I hate space in File or Directory names ;)
2. I mirror my downloads from my build server to the download server and have directory monitoring on which leads to allways a new file in the database. After 24 hours
   (mirror runs every hour) I have for each File with a versionstring, 24 in jdownloads but only one on the filesystem (the one with the spaces).

*EDIT*

Database Version 5.5.39-MariaDB-1~trusty-log
Database Collationutf8_general_ci
PHP Version5.5.9-1ubuntu4.3
Web Servernginx/1.7.1
WebServer to PHP Interfacefpm-fcgi
Joomla! VersionJoomla! 3.3.3 Stable [ Ember ] 25-July-2014 13:00 GMT
jDownloads Version3.2.10

regards
Steven
  •  

Arno

Hi,
what are your settings here (see pic)?



[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

NemesisRE

Same as your´s but tried also with utf8 =>yes and remove special chars => no and other combinations but it´s always the same.
  •  

Arno

#3
Strange thing. Can you send me login data for your backend as super admin via PM?
I will check this at first here...
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Arno

Seems that i have found the bug. Please wait until tomorow for a fix.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

NemesisRE

Sure thing, keep up the good work :)

regards
Steven
  •  

Arno

Please copy the unzipped file (below) to this folder in your Joomla installation (overwrite the original): JOOMLA/administrator/components/com_jdownloads/helpers/
Try it then again and post here your results. Thanks.

[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

NemesisRE

Didn't work.
But I found it:


1627         if ($is_monitoring){                                                                       
1628             // for auto monitoring is always used the 'fix.upload.filename.specials' option         
1629             $str = preg_replace('/(\s|[^A-Za-z0-9_\-])+/', ' ', $str);                       
1630         } else {                                                                                   
1631             if ($jlistConfig['use.unicode.path.names']){                                           
1632                                                                                 
1633                 // Replace double byte whitespaces by single byte (East Asian languages)           
1634                 $str = preg_replace('/\xE3\x80\x80/', ' ', $str);                                   
1635                                                                                                     
1636                 // Replace forbidden characters by whitespaces                                     
1637                 $str = preg_replace('#[:\#\*"@+=;!><&\%()\]\/\'\\\\|\[]#', "\x20", $str);           
1638                                                                                                     
1639                 // Delete all '?'                                                                   
1640                 $str = str_replace('?', '', $str);                                                 
1641                                                                                   
1642             } else {                                                                               
1643                                                                                 
1644                 if ($jlistConfig['fix.upload.filename.specials']){
1645
1646                     // Is only done when the utf-8 option is not activated
1647                     // Remove any duplicate whitespace, and ensure all characters are alphanumeric 
1648                     $str = preg_replace('/(\s|[^A-Za-z0-9._\-])+/', '', $str);
1649                 }
1650             }
1651         }


As you can see in line 1648 is a dot included in the regex which is missing in line 1629, maybe you use a variable for the pattern or you use a function the be save on changes

regards
Steven
  •  

Arno

Hi Steven,
QuoteAs you can see in line 1648 is a dot included in the regex which is missing in line 1629,
You have right, i have unregarded that your problem was the 'monitoring'. Sorry.

I have fixed it in the beta 3.2.11, which will be published today.  ;)
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •