codingsewer

u/codingsewer


r/programminghorror•

I just ran across this code while going through a sql injection testing report. The code is probably over 10 years old now yet still hanging around our system because management are code hoarders (but wait, someone might use it!).

<cfquery datasource="#DSN#" name="siteQuery">
select title,body,site_id,link_text,key_words 
from pages 
where id = #cgi.query_string#
</cfquery>

"Just take whatever is in the browser and shove it right into your sql that runs on every page... what could go wrong?!"

3712

r/keto•

My wife was diagnosed with thyroid cancer a few weeks back and I've been struggling ever since. Food has always been a comfort for me but I feel like I'm suffering from a mental illness here because eating sugary crap makes me feel less stressed until, due to being previously low carb, I feel like I'm going to die.

I started yesterday going back to my strictest rules: 20 carbs and NO sugar / sugar substitutes. This morning I started a fast with a great breakfast and I don't plan on eating anything until supper. I'm already feeling much better energy wise but I can't shake the feeling that I "want" something comforting to eat. So I'm starting to think that I need to replace the bad with some

918

r/theshaft•

This is probably more suited for a mod but I've had this idea for a while that instead of just looking through logs to find griefers or locking building down to particular users we should be using something like a honeypot. The basic idea is that you set a particular area as your honeypot and anyone who destroys blocks or lays water / lava in the area would instantly be banned from the server. Of course you'd want to designate finished buildings or pixel art but if you could spread out the areas so that it's not just the spawn area. It would be really great if you could get really granular and designate things like only the glass in an u

20

r/dwarffortress•

My fortress was doing great. I had a wave of 5 migrants in the fall and 5 more came in winter. Then spring hit and along came 21 dwarves. I was having trouble keeping everyone busy before but now I have a sea of idlers constantly trying to throw parties. Are there any good strategies for handling such a large influx of dwarves or is this just part of the "fun" having idlers until you can get industries expanded to keep everyone busy?

1354

r/dwarffortress•

I just had my first Dwarf Fortress dream last night. I'm not going to see my family again, am I? I'm just going to wake up one day in my workshop with a human-skin throne embellished with spikes and wonder how I got there.

Anyway, in my dream I had just started my fortress and had no military or defenses to speak of. Some sort of weird cataclysm suddenly destroyed all the plants and trees on the map except for a small grove contained inside the half-completed walls of my fort. That's when I noticed the herd of 50+ hungry elephants bum rushing my fort for the food.

109

r/badcompany2•

I just started playing BFBC2 (360) a few days ago and I hadn't even had a chance to unlock any of the base gadgets for the classes. Then last night I got the Dr. Pepper promotions and setup my veteran status. I log in after doing so and notice that all the base gadgets are now unlocked (40mm, defib, motion mine, repair tool) with the "new" plus sign icons. It made me laugh because I got notification that I unlocked the defib while I was using it to revive someone. I just checked today and the offical BFBC2 stats page is not showing the basic gadgets unlocked. Anyone have any idea if this is tied to the new promotion classes or veteran status?

39

You've reached the end of this feed.