One Train Working
stop the intermittent InvalidAuthToken error!I can't figure out why the Rails core team hasn't fixed this yet...
The form_authentication_token is composed of Base64 and it kills some Internet Explorer non-Browsers when the Base64 contains '=', '+' or '/' (which happens with Base64 sometimes).
The token is generated using ActiveSupport::SecureRandom. It hands out a method called base64(). And, here is the surprise, it also hands out a method called hex(). Why the core team hasn't changed the base64(32) to hex(32) some odd releases of Rails ago is beyond me.
So there is a plugin (by me) that does it for you: http://github.com/coffeeaddict/one_train_working
Finding a sound name wasn't easy, it took some reading of the almighty wikipedia, but I have found this.
Comments
Want to comment?

Thanks for posting your plugin. I've recently been struggling with similar base64 issues (in cases where a random hex wouldn't make sense), so I can see why this might cause problems. I'm not sure why base64 is even used, I seem to recall using SHA hex strings when I wrote it. Patches do help move the contribution process long though.
The problem is so intermittent that it is accepted as just an other minor error (thank you Microsoft!) by most users.