<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Appnitro Software Forums Topic: Upload File Types</title>
<link>http://www.appnitro.com/forums/</link>
<description>Appnitro Software Forums Topic: Upload File Types</description>
<language>en</language>
<pubDate>Wed, 10 Mar 2010 21:13:04 +0000</pubDate>

<item>
<title>yuniar on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6475</link>
<pubDate>Sat, 04 Jul 2009 11:36:49 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">6475@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Yes, the validator is done within the common-validator.php file.&#60;br /&#62;
Have you managed to install version 2.2?&#60;/p&#62;
&#60;p&#62;If so, to add allowed types or deny certain types, simply modify your config.php file.&#60;br /&#62;
Modify these lines:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;define(&#38;#39;UPLOAD_FILETYPE_ALLOW&#38;#39;,&#38;#39;&#38;#39;);
define(&#38;#39;UPLOAD_FILETYPE_DENY&#38;#39;,&#38;#39;php;php3;php4;php5;phtml;exe;pl;cgi;html;htm;js&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;simply put new file extensions there.
&#60;/p&#62;</description>
</item>
<item>
<title>richardholder on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6459</link>
<pubDate>Thu, 02 Jul 2009 21:49:26 +0000</pubDate>
<dc:creator>richardholder</dc:creator>
<guid isPermaLink="false">6459@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi redityo,&#60;br /&#62;
I am sorry but getting an FTP server is going to take some time.  Am I right in thinking that validation is done via the common-validator.php file?&#60;br /&#62;
If so here is the one we have on our system:&#60;br /&#62;
//validation for file upload filetype&#60;br /&#62;
	function validate_filetype($value){&#60;br /&#62;
		$error_message = VAL_FILETYPE;&#60;br /&#62;
		$value = $value[0];&#60;br /&#62;
		$ext = pathinfo(strtolower($_FILES[$value]['name']), PATHINFO_EXTENSION);&#60;br /&#62;
		if(defined('UPLOAD_FILETYPE_ALLOW') &#38;#38;&#38;#38; (UPLOAD_FILETYPE_ALLOW != '')){&#60;br /&#62;
			//only allow these filetypes&#60;br /&#62;
			$allowed_filetypes = explode(';',strtolower(UPLOAD_FILETYPE_ALLOW));&#60;br /&#62;
			if(!in_array($ext,$allowed_filetypes)){&#60;br /&#62;
				return $error_message;&#60;br /&#62;
			}&#60;br /&#62;
					}elseif(defined('UPLOAD_FILETYPE_DENY') &#38;#38;&#38;#38; (UPLOAD_FILETYPE_DENY != '')){&#60;br /&#62;
			//disallow these filetypes&#60;br /&#62;
			$blacklisted_filetypes = explode(';',strtolower(UPLOAD_FILETYPE_DENY));&#60;br /&#62;
			if(in_array($ext,$blacklisted_filetypes)){&#60;br /&#62;
				return $error_message;&#60;br /&#62;
			}&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		return true;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;Could you let me know how I add allowed file types and deny others?&#60;br /&#62;
Regards&#60;br /&#62;
Richard
&#60;/p&#62;</description>
</item>
<item>
<title>richardholder on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6430</link>
<pubDate>Wed, 01 Jul 2009 13:22:20 +0000</pubDate>
<dc:creator>richardholder</dc:creator>
<guid isPermaLink="false">6430@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi redityo,&#60;br /&#62;
I run my own web server and removed the FTP server some time ago - too much hacking activity :-(( Since the server is on the LAN I don't need it.&#60;br /&#62;
I will re-install it and get back to you later.&#60;br /&#62;
Regards Richard
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6427</link>
<pubDate>Wed, 01 Jul 2009 09:58:52 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">6427@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hmm .. It's weird, if machform 2.0g can work fine, it should work fine also with the new version. Anyway Could you send me your FTP login info to :&#60;/p&#62;
&#60;p&#62;customer.service[at]appnitro.com&#60;/p&#62;
&#60;p&#62;I need to check it further ..
&#60;/p&#62;</description>
</item>
<item>
<title>richardholder on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6420</link>
<pubDate>Tue, 30 Jun 2009 21:50:14 +0000</pubDate>
<dc:creator>richardholder</dc:creator>
<guid isPermaLink="false">6420@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi redityo,&#60;br /&#62;
I have tried that but get this error:&#60;/p&#62;
&#60;p&#62;select element_id, element_type, element_constraint, element_title from &#60;code&#62;ap_form_elements&#60;/code&#62; where form_id='1' and element_type &#38;lt;&#38;gt; 'section' order by element_position asc Query failed: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '&#38;lt;&#38;gt;'&#60;/p&#62;
&#60;p&#62;Machform 2.0g works flawlessly.&#60;/p&#62;
&#60;p&#62;Thanks for your help.&#60;/p&#62;
&#60;p&#62;Richard
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6419</link>
<pubDate>Tue, 30 Jun 2009 21:37:31 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">6419@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi Richard,&#60;/p&#62;
&#60;p&#62;It seems a mysql issue, anyway try to upgrade with these steps :&#60;/p&#62;
&#60;p&#62;1. Rename your previous machform to machform_old&#60;br /&#62;
2. Upload fresh machform package and delete &#34;installer.php&#34; file&#60;br /&#62;
3. Copy &#34;data&#34; folder from &#34;machform_old&#34; folder to new &#34;machform&#34; folder&#60;br /&#62;
4. Set your database information in new &#34;config.php&#34; file
&#60;/p&#62;</description>
</item>
<item>
<title>richardholder on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6418</link>
<pubDate>Tue, 30 Jun 2009 18:40:16 +0000</pubDate>
<dc:creator>richardholder</dc:creator>
<guid isPermaLink="false">6418@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi Yuniar,&#60;br /&#62;
Oops - I have 2.0g installed - what is the recomended upgrade method please?&#60;br /&#62;
If I just overwrite the directory I get a errors - one of which is this:&#60;/p&#62;
&#60;p&#62;&#34;Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT)&#34; etc&#60;/p&#62;
&#60;p&#62;Regards&#60;br /&#62;
Richard
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6415</link>
<pubDate>Tue, 30 Jun 2009 15:28:41 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">6415@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;What is the exact version of your MachForm?&#60;br /&#62;
Check your changelog.txt at the bottom.&#60;/p&#62;
&#60;p&#62;Version 2.1 and above should reject any PHP or HTML file upload by default.
&#60;/p&#62;</description>
</item>
<item>
<title>richardholder on "Upload File Types"</title>
<link>http://www.appnitro.com/forums/topic/upload-file-types#post-6410</link>
<pubDate>Tue, 30 Jun 2009 13:49:47 +0000</pubDate>
<dc:creator>richardholder</dc:creator>
<guid isPermaLink="false">6410@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi, I am getting some irritating people uploading suspicious php files from my website which uses the latest version of Machform - I only want jpg, pdf files to be uploaded and can't find an option to do this.  I have searched the forums and come up with nothing - any help would be much apprecaited.&#60;br /&#62;
Regards&#60;br /&#62;
Richard
&#60;/p&#62;</description>
</item>

</channel>
</rss>
