• Bug with ' (=&#39) in filename?

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #44481  by stefano.bortolato
 
Hi all.
I made a new installation in CentOS 7.3. When I upload a file the name has " ' " (=&#39) I will have an error 015 after upload. The file is not deleted (and usable). An example name with the problem is "Test'1.doc".

Well. I have a CentOS 7.3, backend database MariaDB 15.1, Java Oracle 1.8.0_144, OpenKM 6.3.4 CE under Tomcat 7.0.61 with UTF-8 URI encoding enabled (under Tomcat and OpenKM configuration).
I have the problem with the bundle package and the OKMinstaller.jar.
On the log I find an error like the "error ../Test&#391.doc not found" (I'm sorry, but I deleted the log).
At the moment I made a work-around to extended the "restrict.file.name" (in the Administration->Configuration) with the value "*~;*.bak;*&#39*;".
I have no problem with other special characters (like °, §, è, ç, etc...).

Anybody know anyting about this problem?

Thanks in advance.
 #44491  by jllort
 
The issue might have relation with something we have on discusion last 2 years. Actually we change some characters from server side before storing. WE started doing it to make compatible download etc... between different OS etc.. but nowdays we are not sure had been a good idea do not preserve original name and make some workaround at upper level. Anyway going to your question it seems a bug.

Here two options:
1- Create an issue here : https://github.com/openkm/document-management-system
2- Try to correct yourselft ( I can guide you on the classes involved ):
DBDocumentModule.java line 129
Code: Select all
name = PathUtils.escape(name);
I think the character should be encoded and now we are not doing, should check database value with:
Code: Select all
SELECT * FROM OKM_NODE_BASE WHERE NBS_UUID='get the document uuiud from properties view'

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.