Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit c61dd70095137558934cc2638f1ea2e1a9cac5e6 1 parent 54dd182
@jstart jstart authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 blogger.rb
View
4 blogger.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.