Pelle Braendgaard
2007-Oct-29 22:25 UTC
Quick patch for ActionController::HttpAuthentication::Basic.encode_credentials please +1
Hi Guys, I discovered a problem with the encode_credentials method which is for testing basic authentication. Basically the if the encoded credentials become longer than 60 chars ruby''s Base64.encode64 adds line feeds. At least on my Ruby 1.8.6 on Leopard and Tiger. This doesn''t really follow expected behavior from the doc''s or source code as far as I can see, so it must be at a lower level than I''m looking at. Anyway the solution is simple and just strips the ''\n'' from the base64 encoded credentials. The ticket and patch is at: http://dev.rubyonrails.org/ticket/10021 While not fixing isn''t going to bring down any servers or hold anyones puppies hostage, I''d appreciate a few +1''s in the comments and get it applied for completeness. Pelle -- http://agree2.com - Take back the contract http://extraeagle.com - Solutions for the electronic Extra Legal world http://stakeventures.com - Bootstrapping blog --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---