From 8d66c66be27f795df314a69aeb49c75d075c8016 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 16 Jul 2014 15:52:51 -0700 Subject: 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 Tested-by: Russ Allbery --- perl/lib/Wallet/Object/Duo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.3