summaryrefslogtreecommitdiff
path: root/perl/lib
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-07-16 15:52:51 -0700
committerRuss Allbery <rra@stanford.edu>2014-07-16 16:25:46 -0700
commit8d66c66be27f795df314a69aeb49c75d075c8016 (patch)
tree69ff6801c9ebd5fd11ebb1aa29fc181ca8f02afc /perl/lib
parent66dd4a9093be4562d2c7a7a7d253d2afb034aef8 (diff)
Parse the Duo key_file in relaxed JSON mode
When reading the Duo object configuration to retrieve the Duo admin server, parse the JSON in relaxed mode to match the behavior of Net::Duo itself. Otherwise, we get hung up on trailing commas that Net::Duo doesn't care about. Change-Id: I0a7347b22e379fe5dfe5fdabaec3e23420cf9a63 Reviewed-on: https://gerrit.stanford.edu/1574 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'perl/lib')
-rw-r--r--perl/lib/Wallet/Object/Duo.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/lib/Wallet/Object/Duo.pm b/perl/lib/Wallet/Object/Duo.pm
index fcf3819..6edc4fa 100644
--- a/perl/lib/Wallet/Object/Duo.pm
+++ b/perl/lib/Wallet/Object/Duo.pm
@@ -190,7 +190,7 @@ sub get {
# We also need the admin server name, which we can get from the Duo object
# configuration with a bit of JSON decoding.
- my $json = JSON->new->utf8 (1);
+ my $json = JSON->new->utf8 (1)->relaxed (1);
my $config = $json->decode (scalar slurp $Wallet::Config::DUO_KEY_FILE);
# Construct the returned file.