Permalink
Browse files

URI escape for blogger auth

Simple change to escape email and password for blogger authentication.
It is a minor change, but I wasted about an hour looking through Google
ClientLogin docs to figure out why I received "Bad Authentication",
before I figured out I needed to escape my password.
  • Loading branch information...
1 parent 54dd182 commit c61dd70095137558934cc2638f1ea2e1a9cac5e6 @jstart jstart committed Feb 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 blogger.rb
View
@@ -54,7 +54,7 @@ def color_from_prob(p)
params = YAML::load(File.open("#{ENV['HOME']}/.blogger"))
-account = Blogger::Account.new(params["username"],params["password"])
+account = Blogger::Account.new(URI.escape(params["username"],"@+"),URI.escape(params["password"], "@+"))
blogid = params["blogid"]
userid = params["userid"]
@@ -75,4 +75,4 @@ def color_from_prob(p)
rescue Exception => e
puts e.inspect
puts new_stories.map{|s| s.link_title}.join("\n")
-end
+end

0 comments on commit c61dd70

Please sign in to comment.