1. I can't use the actual email address because AOL will redact the address if a complaint is filed. 2. I can't use the actual ID, because someone could have a field day unsubscribing people 3. I could store a random string in the db, but that seems like overkill
Is there a simple way to obfuscate the email address? Thanks! Tom On Mon, Sep 28, 2009 at 4:18 PM, Marnen Laibow-Koser < [email protected]> wrote: > > TomRossi7 wrote: > > I want to provide a link for users to unsubscribe to our newsletter. > > I don't want the actual email address to show up in the url. > > Why not? If you're only sending the link to that user, there's no > security risk. > > > So I > > would like it something like /unsubscribe/wx313asdf31. What is the > > simplest method of encrypting the email to a URL compliant string? > > As James suggested, if you've already got the users stored in the DB, > then just use their DB ID or a random unique string that you store in > the DB. If you're not storing e-mail addresses in the DB, then you need > some sort of reversible encryption. Base64 or uuencode would also work > if you don't need high security. > > > > Thanks, > > Tom > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > [email protected] > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

