Menu

#31 Bug in FCKEditor not accepting file types

open
nobody
FCKeditor (10)
5
2008-10-07
2008-10-07
max g
No

while hunting bug 2149927 i found another one. The problem is that if I want to upload a png in fckeditor upload it tells me the extension is not allowed. this happens because i have some extensions in allowed as well as in denied. ( note: upload for me is only working with fckeditor version 2.3-3 )

In org.zkforge.fckez.uploader.SimpleUploaderServlet.extIsAllowed(String fileType, String ext) misbehaves because of the following:

if (allowList.size() == 0)
if (denyList.contains(ext))
return false;
else
return true;

if (denyList.size() == 0)
if (allowList.contains(ext))
return true;
else
return false;

in my case both lists contain entries so it never return true.

i think the following code would be better as it also prevents unallowed uploads in case of an empty allow list and a non-empty deny list:

if (denyList.contains(ext))
return false;
else if (allowList.contains(ext))
return true;
else
return false;

Discussion


Log in to post a comment.