1. 18 12月, 2015 1 次提交
    • D
      Document when fallback_location is used [ci-skip] · 91e3aa19
      Derek Prior 提交于
      If you're not familiar with how the `Referer` header works, you likely
      won't understand why you need to provide a fallback or under what
      circumstances it would be used.
      
      Hopefully this clarifies things a bit.
      91e3aa19
  2. 17 12月, 2015 2 次提交
    • D
      Deprecate `redirect_to :back` · dc4429ca
      Derek Prior 提交于
      Applications that use `redirect_to :back` can be forced to 500 by
      clients that do not send the HTTP `Referer` (sic) header.
      `redirect_back` requires the user to consider this possibility up front
      and avoids this trivially-caused application error.
      dc4429ca
    • 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
  3. 27 8月, 2015 1 次提交
    • A
      remove RackDelegation module · d4743874
      Aaron Patterson 提交于
      Since all controller instances are required to have a request and
      response object, RackDelegation is no longer needed (we always have to
      delegate to the response)
      d4743874
  4. 07 8月, 2014 1 次提交
  5. 16 7月, 2014 1 次提交
  6. 07 6月, 2014 1 次提交
  7. 21 5月, 2014 1 次提交
  8. 14 12月, 2013 1 次提交
  9. 19 9月, 2013 2 次提交
    • D
      Fix regex used to find URI schemes in redirect_to · a78c10d3
      Derek Prior 提交于
      The previous regex was allowing `_` in the URI scheme, which is not
      allowed by RFC 3986. This change brings the regex in line with the RFC.
      a78c10d3
    • D
      Fix incorrect assert_redirected_to failure message · 1dacfbab
      Derek Prior 提交于
      In some instances, `assert_redirected_to` assertion was returning an
      incorrect and misleading failure message when the assertion failed.
      This was due to a disconnect in how the assertion computes the redirect
      string for the failure message and how `redirect_to` computes the
      string that is actually used for redirection.
      
      I made the `_compute_redirect_to_loaction` method used by `redirect_to`
      public and call that from the method `assert_redirect_to` uses to
      calculate the URL.
      
      The reveals a new test failure due to the regex used by
      `_compute_redirect_to_location` allow `_` in the URL scheme.
      1dacfbab
  10. 01 2月, 2013 1 次提交
    • E
      Use \A in Regexps · baa240d0
      Egor Homakov 提交于
      So, if there is redirect_to params[:q]
      i can send ?q=javascript:asdf()%0A/localpath
      Or something more nasty, so please use \A
      baa240d0
  11. 15 1月, 2013 1 次提交
  12. 06 1月, 2013 1 次提交
  13. 13 12月, 2012 1 次提交
    • C
      Refactor helpers code in Action Pack a bit · cff0e51a
      Carlos Antonio da Silva 提交于
      * Avoid calling class_eval when not needed
      * Remove helpers_path attr accessor, it's defined as a class attribute a
        few lines later
      * Avoid creating extra arrays when finding helpers, use flat_map and sort!
      * Remove not required refer variable when redirecting :back
      cff0e51a
  14. 12 12月, 2012 1 次提交
  15. 28 10月, 2012 1 次提交
  16. 17 5月, 2012 1 次提交
  17. 15 5月, 2012 1 次提交
  18. 30 4月, 2012 1 次提交
  19. 03 4月, 2012 1 次提交
  20. 16 3月, 2012 1 次提交
  21. 05 12月, 2011 2 次提交
  22. 26 10月, 2011 1 次提交
  23. 04 9月, 2011 1 次提交
  24. 20 8月, 2011 1 次提交
  25. 15 6月, 2011 2 次提交
  26. 24 9月, 2010 2 次提交
  27. 09 9月, 2010 1 次提交
  28. 03 9月, 2010 1 次提交
  29. 02 9月, 2010 1 次提交
  30. 17 3月, 2010 1 次提交
  31. 27 2月, 2010 1 次提交
  32. 26 2月, 2010 1 次提交
  33. 22 2月, 2010 1 次提交
  34. 13 1月, 2010 1 次提交
  35. 07 1月, 2010 1 次提交