ClearFoundation Tracker - ClearOS
View Issue Details
0000372ClearOSapp-flexshare - Flexsharespublic2011-10-24 02:012015-05-04 14:38
taryck 
 
normalminoralways
closedsuspended 
5.2-SP1 
 
0000372: email upload directory problem with Regex
As describe with more details in http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,13/func,view/id,31143/ [^]

I'm using directory like
Dir = users/me/2011-08 - archive/
With space and "-".

This kind of directory seems to be supported as we can see in :
  $regex = "^Dir[[:space:]]*=[[:space:]]*([A-Za-z0-9\-\_\/\. ]+$)";
  if (eregi($regex, $mymessage[$index]['Subject'], $match)) {

For a reason I do not understand the "\-" that stand for "-" is not valid for eregi function.
To solve this issue i've made change on /var/webconfig/api/Flexshare.class.php
I've changed :
  $regex = "^Dir[[:space:]]*=[[:space:]]*([A-Za-z0-9\-\_\/\. ]+$)";
  if (eregi($regex, $mymessage[$index]['Subject'], $match)) {
To this
  $regex = "^Dir[[:space:]]*=[[:space:]]*([A-Za-z0-9\_\/\. \-]+$)";
  if (eregi($regex, $mymessage[$index]['Subject'], $match)) {
And now it's working.
No tags attached.
Issue History
2011-10-24 02:01taryckNew Issue
2011-10-24 12:32user2Statusnew => confirmed
2011-10-24 15:10user2Severitymajor => minor
2015-05-04 14:38user2Statusconfirmed => closed
2015-05-04 14:38user2Resolutionopen => suspended

There are no notes attached to this issue.