[Paste] Re: paste.auth.cookie newline bug still present

Top Page
Author: Ian Bicking
Date:  
To: Jon Nelson
CC: Paste Users
Subject: [Paste] Re: paste.auth.cookie newline bug still present
On Thu, Mar 26, 2009 at 1:01 PM, Jon Nelson
<jnelson+paste@???<jnelson%2Bpaste@???>
> wrote:


> The problem is that base64.encodestring *may* produce more than one
> line, and the code is not prepared for this.
>
> Current:
>
> 140 cookie = base64.encodestring(
> 141 hmac.new(self.secret, content, sha1).digest() +
> 142 make_time(time.time() + 60*self.timeout) +
> 143 content)[:-1]
> 144 cookie = cookie.replace("/", "_").replace("=", "~")
>
> Correct:
>
> 140 cookie = base64.encodestring(
> 141 hmac.new(self.secret, content, sha1).digest() +
> 142 make_time(time.time() + 60*self.timeout) +
> 143 content)
> 144 cookie = cookie.replace("/", "_").replace("=",
> "~").replace('\n', '')
>


This was fixed in r7733, 1/8/09, though I guess there hasn't been a release
since then.


-- 
Ian Bicking  |  http://blog.ianbicking.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste-users@???
To unsubscribe from this group, send email to paste-users+unsubscribe@???
For more options, visit this group at http://groups.google.com/group/paste-users?hl=en
-~----------~----~----~----~------~----~------~--~---