Shopify / ejson

EJSON is a small library to manage encrypted secrets using asymmetric encryption.
MIT License
1.34k stars 62 forks source link

Weird behaviour if space between key and colon #19

Closed tahnok closed 8 years ago

tahnok commented 8 years ago

If I have a valid json file like

{
  "_public_key": "827ec2078b64d83e1a0bebdedd8769289d4e5ef1e03403da3a4c60407fb0d516",
  "foo" : "bar",
  "bar": "foo"
}

(note the space between foo and :)

running ejson encrypt gives me

{
  "_public_key": "827ec2078b64d83e1a0bebdedd8769289d4e5ef1e03403da3a4c60407fb0d516",
  "foo" "foo" : "EJ[1:wKT8j2st5FPH/nx/vDyHJWDD+5VleU1+sDq+/LjnQUU=:u7OOwFwSdY9RQvRPOh/fxXywYdGUwJ7C:7xnqT7iVubp7e8kaR7hu7NGeSw==]",
  "bar": "EJ[1:wKT8j2st5FPH/nx/vDyHJWDD+5VleU1+sDq+/LjnQUU=:ZfGGyhDrjufcsZZK3Ik+q4ESoSc61hxQ:Hh+ofr0O6lW9fv0jis8RHC4rdw==]"
}