Opened 9 years ago

Closed 9 years ago

#1944 closed Bug (fixed)

Connector interpretes parameter wrong

Reported by: mosipov Owned by:
Priority: Normal Milestone: FCKeditor 2.6
Component: File Browser Version: FCKeditor 2.6 Beta
Keywords: Confirmed Cc:

Description (last modified by wwalc)

Fire PHP Connector with:\

Response should be an error because the CurrentFolder does not start with a /

The actual response is:

<Connector command="GetFolders" resourceType="Image">
<CurrentFolder path="/\/" url="/_userfiles/image/\/"/>

Change History (10)

comment:1 Changed 9 years ago by mosipov

  • Description modified (diff)

comment:2 Changed 9 years ago by fredck

  • Milestone set to FCKeditor 2.6
  • Priority changed from High to Normal

comment:3 Changed 9 years ago by wwalc

  • Component changed from Server : PHP to File Browser
  • Keywords Discussion added

Current behaviour of connectors is different to that described in Server Side Integration. If trailing or leading slash is missing, it is appended / prepended to the folder name to make a valid path from it.

Shouldn't this be corrected in documentation?

comment:4 Changed 9 years ago by mosipov

  • Description modified (diff)

I'd correct the PHP implementation. requiring a pre and appended slash makes sense for correctness' sake. Other implementations may suffer too.

I'd not recommend a folder containing a backslash in its name. It is sanitized when creating a folder.

comment:5 Changed 9 years ago by wwalc

  • Description modified (diff)

All connectors use the same algorithm (different than described in documentation), so let's stick to it in 2.6.

Backslash in folder name is sanitized because it is not allowed in Windows, however it is a valid folder name in linux. So if someone already have a folder with such name, we should allow him to use it.

comment:6 Changed 9 years ago by fredck

  • Keywords Confirmed added; Discussion removed

I agree with wwalc... all connectors already offer a default behavior regarding the backslash. If it is missing, we simply add them. I've updated the documentation for the sake of correctness, but let's remember that our current code base is the most accurate documentation.

There are problems instead by accepting folder names containing "\". I've just did some tests with it over Windows, and the results are unpredictable. We should therefore check the name and not accept it, just like we do today, returning error 102.

comment:7 Changed 9 years ago by fredck

ASP.NET fixed with [1770].

comment:8 Changed 9 years ago by wwalc

Fixed with [1797] (my intention was to split that commit into three parts but I pressed the "OK" button too fast).


  • In ASP & ColdFusion connectors, SendError() function was missing. It is defined in basexml.ext file which is not included in upload.ext. SendError() is called by GetCurrentFolder().
  • Lasso connector didn't check for "..", so it required additional modifications.
  • All other connectors (php, perl, python) required very small modifications.

comment:9 Changed 9 years ago by wwalc

Added changelog entry with [1798].

comment:10 Changed 9 years ago by wwalc

  • Resolution set to fixed
  • Status changed from new to closed

Ok, I'm closing this one.

I have created a separate ticket for Java connector: #2053.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy