Is there a way to disable file fliters for uploads

Last post 03-10-2010, 1:16 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  03-09-2010, 2:59 PM 59281

    Is there a way to disable file fliters for uploads

    I need to remove the file filter for uploading so my client can upload any files they want to. Im currently having to add them manually to the default security config file, would be very help if i could just disable the file filters.
    Filed under:
  •  03-09-2010, 3:32 PM 59283 in reply to 59281

    Re: Is there a way to disable file fliters for uploads

    Yes, please modify CuteSoft_Client\CuteEditor\Dialogs\InsertDocument.aspx
     
    1. Remove the following code.
     
    InputFile.ValidateOption.AllowedFileExtensions=string.Join(",",(string[])secset.DocumentFilters.ToArray(typeof(string)));
     
    2.
     
    Change
     
       protected override void GetFiles(ArrayList files)
       {
            ...
       }
     
    to:
     
       protected override void GetFiles(ArrayList files)
       {   
            files.AddRange(fs.GetFileItems(CurrentDirectory, "*.*"));
       }

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-10-2010, 9:54 AM 59304 in reply to 59283

    Re: Is there a way to disable file fliters for uploads

    Thanks Adam,
     
    That fixed the file filter problem for me. However, now the client is running into errors trying to upload exe's. Ive tested and it gives a simple permissions errors when the upload is done. It seems to be isolated to CuteEditor since i can use our regular asp.net upload control and upload an exe with no problems. Im assuming this is a security feature of CE and makes perfect sense. Is there a way for me to disable this security feature? Im just using CE for input on the backend of the site, only site admins will have access to this control, so im not worried about people uploading malicious files. Thanks for your help.
     
     
  •  03-10-2010, 1:16 PM 59306 in reply to 59304

    Re: Is there a way to disable file fliters for uploads

    Daveg:
    Thanks Adam,
     
    That fixed the file filter problem for me. However, now the client is running into errors trying to upload exe's. Ive tested and it gives a simple permissions errors when the upload is done. It seems to be isolated to CuteEditor since i can use our regular asp.net upload control and upload an exe with no problems. Im assuming this is a security feature of CE and makes perfect sense. Is there a way for me to disable this security feature? Im just using CE for input on the backend of the site, only site admins will have access to this control, so im not worried about people uploading malicious files. Thanks for your help.
     
     
     
    exe, dll and cab files may contain malicious code so they will be dnied on the server side. If you do need to allow those files, you can request a customized build by writing karen@cuteSoft.net.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML