Apache OpenOffice (AOO) Bugzilla – Issue 50533
verify system pathes, so "not allowed values" cant make trouble
Last modified: 2013-02-07 21:54:21 UTC
See the corresponding sub tasks. They show some problems which can occure if you are able to use "anything you like" inside e.g. a SaveAs dialog as file name. We should restrict these in a platform dependend way. Because the list of allowed values within a file name is different e.g. between windows and linux. AS->JSK: Please provide a list of all keywords, letters etcpp, which can make trouble by using it inside file names. Then send this task to MMP. AS->MMP: Please specify the handling in case the user typed in such "non acceptable" keywords and letters. Then send this task to HRO. AS->HRO: Please provide the new functionality inside OSL so it can be used by the file content provider. If needed please send this task to ABI, so he can make the needed changes inside its file UCP. Or send this task to me, so I can implement the error handling inside the file save dialog.
setting started.
Most restrictive platform is windows due to its DOS heritage. So let's start there: Reserved names are: COM1 ... COM9 (with or without suffix) LPT1 ... LPT9 (with or without suffix) CON, PRN, AUX, CLOCK$, NUL Forbidden ASCII characters are 0 ... 31 (\,/,:,*,?,",<,>,| ...) Rules - no . as first letter - not more than one . - no . as last letter Sparc and linux: Are not restrictive at all. Almost any character and filename can be used, if necessary by "escaping" them. /dev/nul is a bad place to store files. However, there may be constraints set by the filesystem used. Using ASCII 0 ... 31 is always a bad idea, we might want to prohibit that. All OSes: - maximum filename length is 255 chars There is a document on the net that might give additional insight: http://www.portfoliofaq/pfaq/FAQ00352.htm. The document takes into account that there might be problems with network shares as well regarding the characters !+{}&[]. Issues to consider: - not all characters can be entered into our filesave-dialog (escaping is not possible) - BASIC has no means to protect the user against doing strange things. It allows any character BASIC knows about by building filenames using CHR$(ASCII DEC CHAR). Same for any other programming language. - we must pay attention to situations where a filename gets converted to something else (in the past we converted names like "a%20b" to "a b" which turned the entries in the picklist invalid). I don't know if this still applies. - probably not all characters can be displayed in our file-open dialog (tab, vertical tab etc.) but we should leave that aside for now. Please add it to the spec anyway. JSK->MMP: Is this good enough for you to work with or do you need more info?
I am no longer officially active on OOo. Please take over.