bugphpGroupWare - Bugs: bug #7303, Case sensitivity problematic in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7303: Case sensitivity problematic in VFS (SQL)

Submitter:  Michael Totschnig <totschnig>
Submitted:  Sat 17 Jan 2004 11:39:23 PM UTC
   
 
Category:  filemanager Item Group:  0.9.16RC2
Severity:  3 - Normal Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  lpiepho Open/Closed:  Open
Component Version:  SVN Operating System:  GNU/Linux - Debian
Reproducibility:  None Planned Release:  None
Fixed Release: 

Sat 17 Jan 2004 11:39:23 PM UTC, original submission:  

Using phpgroupware with MySQl, in filemanage, when you try to rename a file or directory by only changin case (e.g. file.txt to File.txt) the following error is raised:

Warning: unlink(/var/phpgroupware/files/home/michael/File.txt): No such file or directory in /var/www/html/phpgw_16/phpgwapi/inc/class.vfs_sql.inc.php on line 1618

followed by the message telling that file.txt had be renamed to File.txt. But the file is only renamed on the filesystem , it appears from the directory listing, until you use the update function.

The reason for the error, is the SQL query in the file_exists function: Since in MYSQL comparison on text fields is case insensitive, it believes that File.txt exists. Function mv then calls function rm to remove it from the filesytem.

A complete fix to this problem (which also appears in other situations) does not seem to be trivial. Either the VFS must be declared case insensitive, and all directory and file names must be translated to either upper or lower case, or all SQL queries must use functions that are case sensitive. In MySQL, according to the manual, you'd have to use
`INSTR(col_name, "A")=1' or `STRCMP(col_name, "A") = 0', but does this also work in other RDBMS?

Michael Totschnig <totschnig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2004-01-20 powerstat Assigned toNone lpiepho

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code