<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1042175" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1042175</link>
    <description></description>
    <language>en</language>
          <item>
    <title>well, my ideia is this:
i</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234873</link>
    <description> &lt;p&gt;well, my ideia is this:&lt;/p&gt;
&lt;p&gt;i never show the user the path of the file. (is this possible?)&lt;/p&gt;
&lt;p&gt;when a user logs in, i create a session id (among hash in the process).&lt;/p&gt;
&lt;p&gt;i&#039;ve been thinking about the function to parse the download file.&lt;/p&gt;
&lt;p&gt;it verifies: &lt;/p&gt;
&lt;p&gt;1. the user of the specified area is log in?&lt;br /&gt;
2. the user session id is valid?&lt;br /&gt;
3. the file is there?&lt;/p&gt;
&lt;p&gt;if this is all true, then it outputs the file from a download file dialog box.&lt;/p&gt;
 </description>
     <pubDate>Wed, 05 Nov 2008 22:26:05 +0000</pubDate>
 <dc:creator>joaocarmopereira</dc:creator>
 <guid isPermaLink="false">comment 1234873 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Adding some extra security</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234608</link>
    <description> &lt;p&gt;Adding some extra &lt;strong&gt;security by obscurity&lt;/strong&gt; couldn&#039;t hurt.&lt;/p&gt;
&lt;p&gt;I agree that user validation is necessary - but if someone figures out how to hack that, the obscurity is another level of protection.&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Oct 2008 15:42:38 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1234608 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>That&#039;s the phrase I couldn&#039;t</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234603</link>
    <description> &lt;p&gt;That&#039;s the phrase I couldn&#039;t remember.  I know it was o-b something, but I couldn&#039;t remember the word for the life of me. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Oct 2008 14:10:35 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1234603 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Security by hiding the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234587</link>
    <description> &lt;p&gt;Security by hiding the username is a form of &lt;a href=&quot;http://en.wikipedia.org/wiki/Security_through_obscurity&quot;&gt;security by obscurity&lt;/a&gt; and generally doesn&#039;t work. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Just wanted to point that out, it&#039;s an interesting subject.&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Oct 2008 08:21:07 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1234587 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>(I once went to a</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234582</link>
    <description> &lt;blockquote&gt;&lt;p&gt;(I once went to a colleague&#039;s web site, password protected... guess what the log in was? uname: admin pw: admin -- funny thing is, even after I told him it was a security risk, he didn&#039;t change it...)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;True, the one biggest security risk is...the user. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Oct 2008 03:59:00 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1234582 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I was commenting</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234581</link>
    <description> &lt;p&gt;I was commenting specifically on the OP&#039;s sample URL&lt;/p&gt;
&lt;p&gt;It&#039;s critical to use verification for access&lt;/p&gt;
&lt;p&gt;It doesn&#039;t hurt to avoid the obvious-&lt;/p&gt;
&lt;p&gt;(I once went to a colleague&#039;s web site, password protected... guess what the log in was? &lt;strong&gt;uname: admin pw: admin&lt;/strong&gt; -- funny thing is, even after I told him it was a security risk, he didn&#039;t change it...)&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Oct 2008 03:25:21 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1234581 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Because, especially if</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234577</link>
    <description> &lt;blockquote&gt;&lt;p&gt;Because, especially if security is a concern, if a user knows the structure of the url for her/his own files, and discovers the usernames of other users, bingo, you&#039;ve got a leak.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;But that&#039;s why you verify the user&#039;s session before you pass the file.  If you write a PHP script that&#039;s like a download manager, you can check to make sure the permissions are verified.&lt;/p&gt;
&lt;p&gt;Random hard-to-guess names != security.  Protect them instead.&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Oct 2008 02:08:19 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1234577 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Why not?
Because, especially</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234575</link>
    <description> &lt;blockquote&gt;&lt;p&gt;Why not?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Because, especially if security is a concern, if a user knows the structure of the url for her/his own files, and discovers the usernames of other users, bingo, you&#039;ve got a leak.&lt;/p&gt;
&lt;p&gt;For that reason, on a ratings site I work on, the images are assigned a pseudo-random filename associated with the user in the db when they are uploaded, so that they are really only viewable in the site...&lt;/p&gt;
 </description>
     <pubDate>Mon, 27 Oct 2008 23:52:40 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1234575 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>DO NOT use an obvious</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234571</link>
    <description> &lt;blockquote&gt;&lt;p&gt;DO NOT use an obvious structure like the username in the URL - assign a pseudo-random id to the user (you can cross ref them in your db).&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Why not?&lt;/p&gt;
 </description>
     <pubDate>Mon, 27 Oct 2008 23:30:51 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1234571 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>How do I prevent other users</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/phpapache-file-directory-security#comment-1234570</link>
    <description> &lt;blockquote&gt;&lt;p&gt;How do I prevent other users to download files from each area? (using direct links like &lt;a href=&quot;http://www.website.com/users/user_a/file.mp3&quot; title=&quot;http://www.website.com/users/user_a/file.mp3&quot;&gt;http://www.website.com/users/user_a/file.mp3&lt;/a&gt; )&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;DO NOT use an obvious structure like the username in the URL - assign a pseudo-random id to the user (you can cross ref them in your db).&lt;/p&gt;
&lt;p&gt;You&#039;re basically talking about ACL issues, there are some resources in this &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=php%2Fmysql+acl&quot;&gt;Google search&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also use a platform with fine-grained permissions like &lt;a href=&quot;http://drupal.org&quot;&gt;Drupal&lt;/a&gt; to manage your site&#039;s content and users.&lt;/p&gt;
 </description>
     <pubDate>Mon, 27 Oct 2008 23:22:52 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1234570 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
