diff --git a/bin/verifier b/bin/verifier index 7619f501a9a8d60d0e4344b10f2ed1d3d9dbb3f2..8da38a12f39c7d57a035635a3e1271360376af46 100755 --- a/bin/verifier +++ b/bin/verifier @@ -112,7 +112,7 @@ app.post('/verify', function(req, resp, next) { resp.json({"status":"failure", reason: (error ? error.toString() : "unknown")}); metrics.report('verify', { result: 'failure', - rp: audienceFromAssertion + rp: audience }); }); diff --git a/lib/db/json.js b/lib/db/json.js index 9b5b68095b810031fbc27e0921c49fab390af76f..fc5705376d9535ad3d016cae47db599d952dc01d 100644 --- a/lib/db/json.js +++ b/lib/db/json.js @@ -82,6 +82,10 @@ function flush() { function sync() { try { db = JSON.parse(fs.readFileSync(dbPath)); + + // FIXME: + // at this point db might be missing some important fields + // we may want to fix this. In the meantime, delete your old json db } catch(e) { logger.error("Cannot read database from " + dbPath); }