1. 30 3月, 2018 1 次提交
    • D
      Deprecate controller level force_ssl · 4701a50b
      Derek Prior 提交于
      Today there are two common ways for Rails developers to force their
      applications to communicate over HTTPS:
      
      * `config.force_ssl` is a setting in environment configurations that
        enables the `ActionDispatch::SSL` middleware. With this middleware
        enabled, all HTTP communication to your application will be redirected
        to HTTPS. The middleware also takes care of other best practices by
        setting HSTS headers, upgrading all cookies to secure only, etc.
      * The `force_ssl` controller method redirects HTTP requests to certain
        controllers to HTTPS.
      
      As a consultant, I've seen many applications with misconfigured HTTPS
      setups due to developers adding `force_ssl` to `ApplicationController`
      and not enabling `config.force_ssl`. With this configuration, many
      application requests can be served over HTTP such as assets, requests
      that hit mounted engines, etc. In addition, because cookies are not
      upgraded to secure only in this configuration and HSTS headers are not
      set, it's possible for cookies that are meant to be secure to be sent
      over HTTP.
      
      The confusion between these two methods of forcing HTTPS is compounded
      by the fact that they share an identical name. This makes finding
      documentation on the "right" method confusing.
      
      HTTPS throughout is quickly becomming table stakes for all web sites.
      Sites are expected to operate over HTTPS for all communication,
      sensitive or otherwise. Let's encourage use of the broader-reaching
      `ActionDispatch::SSL` middleware and elminate this source of user
      confusion. If, for some reason, applications need to expose certain
      endpoints over HTTP they can do so by properly configuring
      `config.ssl_options`.
      4701a50b
  2. 26 3月, 2018 1 次提交
  3. 12 3月, 2018 1 次提交
  4. 28 11月, 2017 1 次提交
  5. 25 10月, 2017 1 次提交
  6. 09 10月, 2017 1 次提交
  7. 06 10月, 2017 1 次提交
  8. 20 9月, 2017 1 次提交
    • C
      Use credentials, not secrets, for Active Storage (#30650) · 2f8ecdb2
      Claudio B 提交于
      According to #30067:
      
      > This PR will deprecate secrets.yml* and instead adopt
      > config/credentials.yml.enc to signify what these secrets are specifically
      > for: Keeping API keys, database passwords, and any other integration
      > credentials in one place.
      
      [ci skip] since only comments are being edited.
      2f8ecdb2
  9. 19 9月, 2017 1 次提交
  10. 14 9月, 2017 1 次提交
  11. 23 8月, 2017 1 次提交
  12. 12 7月, 2017 1 次提交
  13. 22 5月, 2017 1 次提交
  14. 30 3月, 2017 1 次提交
  15. 29 3月, 2017 1 次提交
    • F
      add hint on after_action filters · 2b3a3738
      Frederik Wille 提交于
      Adds a hint that ``after_action``-callbacks are not executed when an
      exception was raised in the rest of the request cycle. The
      ``before_action`` section mentions "If there are additional filters
      scheduled to run after that filter, they are also cancelled." but this
      is IMO not sufficient.
      2b3a3738
  16. 23 11月, 2016 1 次提交
  17. 12 11月, 2016 1 次提交
  18. 17 7月, 2016 1 次提交
  19. 14 6月, 2016 1 次提交
  20. 28 5月, 2016 1 次提交
  21. 21 5月, 2016 1 次提交
  22. 31 3月, 2016 1 次提交
  23. 15 3月, 2016 1 次提交
  24. 20 1月, 2016 1 次提交
  25. 12 1月, 2016 1 次提交
  26. 18 12月, 2015 1 次提交
  27. 17 12月, 2015 1 次提交
    • D
      Add `redirect_back` for safer referrer redirects · 13fd5586
      Derek Prior 提交于
      `redirect_to :back` is a somewhat common pattern in Rails apps, but it
      is not completely safe. There are a number of circumstances where HTTP
      referrer information is not available on the request. This happens often
      with bot traffic and occasionally to user traffic depending on browser
      security settings.
      
      When there is no referrer available on the request, `redirect_to :back`
      will raise `ActionController::RedirectBackError`, usually resulting in
      an application error.
      
      `redirect_back` takes a required `fallback_location` keyword argument
      that specifies the redirect when the referrer information is not
      available.  This prevents 500 errors caused by
      `ActionController::RedirectBackError`.
      13fd5586
  28. 18 9月, 2015 1 次提交
  29. 11 9月, 2015 1 次提交
  30. 02 9月, 2015 1 次提交
  31. 30 8月, 2015 1 次提交
  32. 23 8月, 2015 1 次提交
  33. 28 6月, 2015 1 次提交
  34. 16 6月, 2015 1 次提交
  35. 05 5月, 2015 1 次提交
  36. 10 4月, 2015 2 次提交
  37. 12 3月, 2015 1 次提交
  38. 13 2月, 2015 1 次提交
  39. 14 1月, 2015 1 次提交