rails/rails — pull request #11296 by xuanxu (2013-07-04 16:56:53+00:00)
Title: Use SecureRandom.urlsafe_base64 for authenticity_token.

If `base64` is used the authenticity_token can include '+', a character that is not URL-safe.

The authenticity_token can cause problems when it includes a plus sign, because it is encoded as a space so the request can't be verified.

Using the `urlsafe_base64` method the authenticity_token will only include A-Z, a-z, 0-9, - and _ making it URL-safe when sent in any form params.