4 ms·
I think it could happen just as easily in Java, especially in continuous integration scripts, which are nearly fully automated. I've nearly done something in H
by catch23 16y ago
I think it could happen just as easily in Java, especially in continuous integration scripts, which are nearly fully automated. I've nearly done something in Hibernate before just by running ant scripts that looked at my environment variables to see which database it should truncate. If I forget to change back the environment variable and my machines were able to access the prod servers, same thing could happen. Only reason it didn't happen for me is because I usually have pretty strict rules in my pg_hba.conf file that prevents foreign hosts from connecting.
- mml 16y agoNot really. Reasonably complex java apps would use jndi to store a single db connect name, which the app server maps internally to db credentials. That way, the app just says "connect me to /x" and the container gives the app /x, which might be the test or prod db connection, the app never knows, or cares. You get the db that the operations guys configured for -that- environment. Jndi is horrible in many ways, and so are app containers, but there are a few niceties that ruby-land could learn from.