<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — pun_attachment does not consider forum permissions]]></title>
		<link>https://punbb.informer.com/forums/topic/21657/punattachment-does-not-consider-forum-permissions/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/21657/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in pun_attachment does not consider forum permissions.]]></description>
		<lastBuildDate>Thu, 16 Jul 2009 14:01:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: pun_attachment does not consider forum permissions]]></title>
			<link>https://punbb.informer.com/forums/post/129075/#p129075</link>
			<description><![CDATA[<p>Fixed in the first release of the <a href="http://punbb.informer.com/forums/topic/21898/extension-release-punattachment/">pun_attachment</a></p>]]></description>
			<author><![CDATA[null@example.com (Slavok)]]></author>
			<pubDate>Thu, 16 Jul 2009 14:01:34 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/129075/#p129075</guid>
		</item>
		<item>
			<title><![CDATA[Re: pun_attachment does not consider forum permissions]]></title>
			<link>https://punbb.informer.com/forums/post/127950/#p127950</link>
			<description><![CDATA[<p>Hey narayan,<br />Thanks for posting this.&nbsp; So if I modify the same as you have posted above it should work on my install as well correct?</p>]]></description>
			<author><![CDATA[null@example.com (RogueFoxx)]]></author>
			<pubDate>Mon, 25 May 2009 14:40:29 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/127950/#p127950</guid>
		</item>
		<item>
			<title><![CDATA[pun_attachment does not consider forum permissions]]></title>
			<link>https://punbb.informer.com/forums/post/127786/#p127786</link>
			<description><![CDATA[<p>First, thanks for the extension, it is useful.</p><p>I have a few private forums where people should be able to upload files. But in the current version of pun_attachment, any logged in user can use the download url to download the file irrespective of whether the user has permissions to the forum.<br />Since the url looks like <a href="http://example.com/forums/misc.php?item=1&amp;download=1,">http://example.com/forums/misc.php?item … ownload=1,</a> you can easily change the item id and get files which you should not have access to.</p><p>To fix this, the following code needs to be modified for hook id=&quot;mi_new_action&quot;. It is around line 1257 in manifest.xml in the version I am using.</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt; &#039;a.id, a.post_id, a.filename, a.file_ext, a.file_mime_type, a.size, a.file_path, a.topic_id&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;attach_files AS a&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;JOINS&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;INNER JOIN&#039;&nbsp; &nbsp; =&gt; &#039;topics AS t&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ON&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;t.id=a.topic_id&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;INNER JOIN&#039;&nbsp; &nbsp; =&gt; &#039;forums AS f&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ON&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;f.id=t.forum_id&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;LEFT JOIN&#039;&nbsp; &nbsp; =&gt; &#039;forum_perms AS fp&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ON&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;(fp.forum_id=f.id AND fp.group_id=&#039;.$forum_user[&#039;g_id&#039;].&#039;)&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;a.id=&#039;.$attach_item.&#039; AND (fp.read_forum IS NULL OR fp.read_forum=1)&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );</p><p>It would be great if you would add this to the next release so that I do not need to maintain a separate version.</p><p>Warm regards,<br />Narayan</p>]]></description>
			<author><![CDATA[null@example.com (narayan)]]></author>
			<pubDate>Tue, 19 May 2009 07:28:09 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/127786/#p127786</guid>
		</item>
	</channel>
</rss>
