From e1f16c3722118560a9c0ff200628319294d89786 Mon Sep 17 00:00:00 2001 From: Kload Date: Sun, 7 Jul 2013 11:17:58 +0000 Subject: [PATCH] base64 dns key --- dynette.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/dynette.rb b/dynette.rb index 5392f4a..09e0c0f 100755 --- a/dynette.rb +++ b/dynette.rb @@ -72,6 +72,7 @@ end before path do if params.has_key?("public_key") public_key = Base64.decode64(params[:public_key]) + puts public_key unless public_key.length == 24 halt 400, { :error => "Key is invalid: #{public_key.to_s.encode('UTF-8', {:invalid => :replace, :undef => :replace, :replace => '?'})}" }.to_json end