Jump to content

Client tickets: how to allow all file attachment types?


Ilya Evseev

Recommended Posts

http://docs.whmcs.com/Support_Tickets#Allowed_File_Attachments

 

The list of allowed file types is configured by going to Setup > General Settings > Support tab. By default, the allowed file types are .jpg, .gif, .jpeg, and .png (ie. image files). It is not possible to allow the user to upload PHP files due to the security risks this creates. You can add new allowed file types to the list such as .pdf, .zip, etc... Just add them into the allowed extensions field separating each allowed ending with a comma.

I think by default all file types are blocked unless specified in the list, so you will need to add each of the extensions you want to be valid.

Link to comment
Share on other sites

http://docs.whmcs.com/Support_Tickets#Allowed_File_Attachments

 

 

I think by default all file types are blocked unless specified in the list, so you will need to add each of the extensions you want to be valid.

 

1) Thank you for citation from official docs, I've already read it.

 

2) We cannot use strict enumeration because we don't know all possible extensions that can be used by our customers.

From the other hand, some of our customers are too stupid for renaming attachments to "xx.dat" before uploading.

So we need to allow all extensions. Is it possible or no??

Link to comment
Share on other sites

If you want to remove it just comment out the tr around line 83 to 98ish in the tpl file for step 2.

Not ideal, but it will work.

Filename is supportticketsubmit-steptwo.tpl in the theme folder of your site...

Can you explain your idea?

 

Whmcs/templates/default/supportticketsubmit-steptwo.tpl in lines 83-98

contains selections for "relatedservice" and "priority".

 

Attachments are handled in lines 123-131:

       <div class="control-group">
           <label class="control-label bold" for="attachments">{$LANG.supportticketsticketattachments}:</label>
           <div class="controls">
               <input type="file" name="attachments[]" style="width:70%;" /><br />
               <div id="fileuploads"></div>
               <a href="#" onclick="extraTicketAttachment();return false"><img src="images/add.gif" align="absmiddle" border="0" /> {$LANG.addmore}</a><br />
               ({$LANG.supportticketsallowedextensions}: {$allowedfiletypes})
           </div>
       </div>

What should be changed here?

Can it really help at all?

Is filetype upload protection REALLY template-based?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated