sc3 / cookcountyjail

A Django app that tracks the population of Cook County Jail over time and summarizes trends.
http://cookcountyjail.recoveredfactory.net/api/1.0/?format=json
Other
31 stars 23 forks source link

DB password #389

Closed wilbertom closed 10 years ago

wilbertom commented 10 years ago

This commit forces a change in the database password and moves it to the environment. closes #386

wilbertom commented 10 years ago

Ups, looks like some api code made it there too. Darn it.

bepetersn commented 10 years ago

You made an interesting function to prompt people to set env bars, but not the important work of setting them in any of our admin files, like scraper.sh, so this will make the scraper fail. On May 19, 2014 4:07 PM, "Wilberto Morales" notifications@github.com wrote:

Ups, looks like some api code made it there too. Darn it.

— Reply to this email directly or view it on GitHubhttps://github.com/sc3/cookcountyjail/pull/389#issuecomment-43558147 .

wilbertom commented 10 years ago

Yup, I have no idea where I gotta tweak those env variables. I'll add it in a few minutes.

bepetersn commented 10 years ago

I'm still setting up my system, or I'd do it.

bepetersn commented 10 years ago

hmmmmmmmm, well I messed up that pull request; @wilbertom, can you re-do it?

wilbertom commented 10 years ago

Hey Brian, no problem, I still needed to add it to the server's env.

wilbertom commented 10 years ago

Wait how did the password get to the deployed app the first time? I don't see any code to tweak. Did someone just ssh and created the database? Or was the database created through an admin interface? If so then it might be easier to use one of those methods again.

~/Programming/SC3/cookcountyjail (db-password) wil$ git grep 'walblgadb;lgall'
ccj/config.py:    if db_config['pw'] == 'walblgadb;lgall':

~/Programming/SC3/cookcountyjail (db-password) wil$ git grep cookcountyjail_v2.0_dev
ccj/config.py:        'db_name': env_var('CCJ_DBNAME', 'cookcountyjail_v2_0_dev'),
tests/test_pgsql_installation.py:    result = local('psql cookcountyjail_v2_0_dev -c "\dt"', capture=True)
tests/test_pgsql_installation.py:    local('psql cookcountyjail_v2_0_dev -c "DROP TABLE elaborate_test;"', capture=True)
bepetersn commented 10 years ago

Well, we should try and handle this the right way.