Permalink
Browse files

fix cookie parsing (left a trailing " at the last value)

  • Loading branch information...
1 parent 956fa32 commit 70b822bd14fe3a30a5411fb5abd40d4c5bfeb4c6 @jkraemer jkraemer committed Sep 7, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/facebooker/rails/controller.rb
View
2 lib/facebooker/rails/controller.rb
@@ -143,7 +143,7 @@ def fb_cookies
def parse_fb_cookies
parsed = {}
return parsed unless Facebooker.api_key and fb_cookie_new = cookies["fbs_#{Facebooker.api_key}"]
- fb_cookie_new = fb_cookie_new[1, fb_cookie_new.length-1]
+ fb_cookie_new = fb_cookie_new[1, fb_cookie_new.length-2] # remove enclosing quotes
fb_cookie_new.split('&').each do |str|
key, val = str.split('=')
parsed[key] = val

0 comments on commit 70b822b

Please sign in to comment.