<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1040676" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1040676</link>
    <description></description>
    <language>en</language>
          <item>
    <title>yeah good link. Thats one of</title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-multiple-users-security#comment-1228546</link>
    <description> &lt;p&gt;yeah good link. Thats one of the ones I found.&lt;br /&gt;
As a comment says, addslashes should mainly only be used for urls&lt;br /&gt;
maybe other things, but importantly, never to insert into a DB when the data is from public input&lt;/p&gt;
&lt;p&gt;It is relatively safe, not many people will be able to hack with that exploit, but the point is some can and &quot;might&quot;, so remember kids, better safe than sorry! &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>Thu, 14 Feb 2008 20:24:41 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1228546 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>greg wrote:

I do use the</title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-multiple-users-security#comment-1228538</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;greg wrote:&lt;/strong&gt; I do use the real_escape, I read a lot about the problems with addslashes and potential exploits.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Ok, for those who read this and said &quot;Whaaaaaa???&quot; (imitating Chris from Family Guy LOL) I did a little searching and found this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string&quot; title=&quot;http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string&quot;&gt;http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-st...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Good thing for programs that let you do search/replaces for all files in a directory &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;-Greg&lt;/p&gt;
 </description>
     <pubDate>Thu, 14 Feb 2008 12:54:52 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1228538 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks for the replies!
Greg</title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-multiple-users-security#comment-1228532</link>
    <description> &lt;p&gt;Thanks for the replies!&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;Greg K wrote:&lt;/strong&gt; A second place where you may want to use multiple users, even it is all only you doing it, is like we have, a beta site for developing code. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Good info, I do have a mirror of sites (large ones anyway) so I can test code before rolling it out on live.&lt;br /&gt;
And I am often cringing when testing stuff with the DB. Often I make a dupe of the DB, but that&#039;s not always possible.&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;teammatt3 wrote:&lt;/strong&gt; And as long as you code your queries properly, you shouldn&#039;t have a problem with SQL injection. Just use mysql_real_escape_string() &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;All my code is very secure. I use ereg or eregi to check for the minimum of slashes and quotes in user inputs and use all the good techniques I have read about, and also a few I make myself. In my opinion, the best security can be the homemade one, as no one else knows about it or how it works.&lt;/p&gt;
&lt;p&gt;I do use the real_escape, I read a lot about the problems with addslashes and potential exploits. So with the coming of php6 making magic quotes obsolete, currently I check if function exists for get_magic_quotes_gpc, if yes check if its running, if yes stripslashes, so then I can use the real_escape, that way current sites will still be fine when php doesnt know what get_magic_quotes_gpc is any more.&lt;br /&gt;
Would be nicer if magic quotes was never made automatic on *some* servers.&lt;br /&gt;
*sigh&lt;/p&gt;
 </description>
     <pubDate>Thu, 14 Feb 2008 05:34:20 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1228532 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I tend to lean towards the</title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-multiple-users-security#comment-1228527</link>
    <description> &lt;p&gt;I tend to lean towards the thought that as long as you are talking about a single mySQL server and single web server, and single person maintaining it, there one general account is good.** I mean if they are somehow going to get into your server to see the access to read a record on one script called review.php, they would be wise enough to browse over to the script that lets someone new sign up and therefore write to the DB too...&lt;/p&gt;
&lt;p&gt;Now, that being said, still set up the account with a reasonable name for possible future branching, if you get someone else programming for you or such. One you get two separate entities (persons, departments, etc) that are making code that can specify where the data is coming and going to (as far as tables and databases), then definitely  start using the differnt users and permissions.&lt;/p&gt;
&lt;p&gt;A second place where you may want to use multiple users, even it is all only you doing it, is like we have, a beta site for developing code. All the databases for the live site start with the prefix &quot;live_&quot; and the dev side of the domain all use &quot;beta_&quot;  then no matter how many different databases i have, the developer site has permission to only access beta_% (% is wildcard in mySQL) This ensures no matter what oopsies I do, the live data is not touched. Also, I have class in place for setting up the database connection, which automatically has the login credentials, as well as auto prepends the &quot;beta_&quot; or &quot;live_&quot; to the database based on the page calling from the subdomain (www. gets live, beta. gets beta)&lt;/p&gt;
&lt;p&gt;Again, good coding practices are key to any security!&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
&lt;p&gt;** PS. Also assuming good coding practices are in place&lt;/p&gt;
 </description>
     <pubDate>Wed, 13 Feb 2008 19:51:49 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1228527 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Having different database</title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-multiple-users-security#comment-1228526</link>
    <description> &lt;p&gt;Having different database users for different operations is a very good idea. The main reason for having user privileges is keeping the users of the database from selecting or manipulating data they shouldn&#039;t be. If you have a large organization, your PR people should be able to select salary information (and perhaps modify it), but the field workers don&#039;t need access to those tables. &lt;/p&gt;
&lt;p&gt;In your case, I think you&#039;re the only user. I think you should create two users. One for web queries (SELECT, UPDATE, DELETE) and another user for advanced queries like modifying tables and that kind of administration. &lt;/p&gt;
&lt;p&gt;Though it is a little more secure to have one user to select, one to delete, and one to update, it&#039;s a lot of work. And as long as you code your queries properly, you shouldn&#039;t have a problem with SQL injection. Just use mysql_real_escape_string() &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 13 Feb 2008 19:07:14 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1228526 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
