Andy-H Posted April 17, 2012 Share Posted April 17, 2012 I've seen a couple of people do this, and done it myself a couple of times. I know it's down to a user and it's your own fault if you forget to remove sensitive information, but it would be cool if PHPFreaks/SMF could automatically search for mysql(i)_connect, imap_open etc. and * out sensitive paramaters before it posts, I've dropped a few bricks in my time posting mysql passwords lol Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/ Share on other sites More sharing options...
requinix Posted April 17, 2012 Share Posted April 17, 2012 That would catch the most common coding style, but couldn't work on the second-most common: define("DB_HOST", "public server"); define("DB_USERNAME", "something embarrassing"); define("DB_PASSWORD", "something equally embarrassing"); mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD); Or basically any other mechanism where the actual information isn't directly inline with the function call. Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338224 Share on other sites More sharing options...
Andy-H Posted April 17, 2012 Author Share Posted April 17, 2012 Yeah but it would help in a lot of cases on here, generally I use that style but keep my defines in a settings.const.php file, but I see alot of people using mysql_query(host, user, pass) on here. Could go as far as checking for variable params and *'ing out the variable definitions? Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338225 Share on other sites More sharing options...
Philip Posted April 17, 2012 Share Posted April 17, 2012 Or... people could hit the "Preview" button before posting and see that they had left it in there I'm sorry, but if you're not willing to take the time to check to make sure your post is properly formatted / de-sensitized then you're only asking for trouble. Just my $0.02. Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338240 Share on other sites More sharing options...
Andy-H Posted April 17, 2012 Author Share Posted April 17, 2012 Or... people could hit the "Preview" button before posting and see that they had left it in there I'm sorry, but if you're not willing to take the time to check to make sure your post is properly formatted / de-sensitized then you're only asking for trouble. Just my $0.02. I am willing to, but we all make mistakes from time to time. Plus what about noobs posting on here for the first time, they don't know the interface, they don't know the preview button is there, they might be to busy consciously trying not to present themselves as an idiot and overlook this. What's wrong with an SMF magic_quotes_gpc? //Edit I am willing to, but we all make mistakes from time to time. Plus what about noobs posting on here for the first time, they don't know the interface, they don't know the preview button is there, they might be to busty consciously trying not to present themselves as an idiot and overlook this. What's wrong with an SMF magic_quotes_gpc? -> I am willing to, but we all make mistakes from time to time. Plus what about noobs posting on here for the first time, they don't know the interface, they don't know the preview button is there, they might be to busy consciously trying not to present themselves as an idiot and overlook this. What's wrong with an SMF magic_quotes_gpc? See lol Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338259 Share on other sites More sharing options...
Philip Posted April 17, 2012 Share Posted April 17, 2012 I am willing to, but we all make mistakes from time to time. Sure, and that is what we are here for (hit report to moderator and we usually fix it pretty quickly.) Plus what about noobs posting on here for the first time, they don't know the interface, they don't know the preview button is there, they might be to busy consciously trying not to present themselves as an idiot and overlook this. While I can agree to that, the Preview button is literally 4 pixels away from the Post button... Man, WTF did you break when editing? haha Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338262 Share on other sites More sharing options...
Andy-H Posted April 17, 2012 Author Share Posted April 17, 2012 Fair enough but not everyone's that nice, I might see details and truncate their users table. I have selective vision, my brain doesn't even process moving the cursor to post and clicking any more, it's in my "muscle memory" lol Anyway, I see where this is going so I'll set this topic solved. lol Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338264 Share on other sites More sharing options...
.josh Posted April 18, 2012 Share Posted April 18, 2012 We also have in red letters above the post buttons a warning.... Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338288 Share on other sites More sharing options...
Andy-H Posted April 18, 2012 Author Share Posted April 18, 2012 People actually read the TOS? lol Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338289 Share on other sites More sharing options...
Philip Posted April 18, 2012 Share Posted April 18, 2012 People actually read the TOS? lol With the amount of "omgz please delete this" PMs we get... I'd say 0.001% read it. PS - Don't get me wrong though Andy - it's a good idea. Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338292 Share on other sites More sharing options...
salathe Posted April 18, 2012 Share Posted April 18, 2012 It's often not the OP's fault if their ISP allows access from anywhere on the intertubes, they really should at least have access hostmasks set up on a per MySQL user basis. That said, if anyone does see/make this mistake and wants to alert the moderators, we're happy to edit the post if we haven't seen to it already. Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338326 Share on other sites More sharing options...
Maq Posted April 18, 2012 Share Posted April 18, 2012 Repeating what everyone else said, users have a sufficient amount of warnings and chances to check their posts. Anyway, if it's reported it usually gets looked at within minutes. Quote Link to comment https://forums.phpfreaks.com/topic/261130-replace-sensitive-information/#findComment-1338463 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.