- 03 12月, 2019 1 次提交
-
-
由 Rafael Mendonça França 提交于
Symbol doesn't respond to `start_with?` so we need to change it to string before doing the comparison.
-
- 14 6月, 2019 1 次提交
-
-
由 Alberto Almagro 提交于
When a route was defined within an optional scope, if that route didn't take parameters the scope was lost when using path helpers. This patch ensures scope is kept both when the route takes parameters or when it doesn't. Fixes #33219
-
- 04 4月, 2019 1 次提交
-
-
由 Jean Boussier 提交于
-
- 03 4月, 2019 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 02 4月, 2019 1 次提交
-
-
由 Sharang Dashputre 提交于
-
- 01 4月, 2019 1 次提交
-
-
由 Emil Shakirov 提交于
* Fix typo in the value of ENCRYPTED_SIGNED_COOKIE_SALT constant * Fix value of cookie in with authenticated encryption flag off in tests [Emil Shakirov + Ryuta Kamizono]
-
- 26 3月, 2019 1 次提交
-
-
由 Josua Schmid 提交于
After this change it's not possible anymore to configure routes like this: routes.draw do resources :users, param: "name/:sneaky" end Fixes #30467.
-
- 18 1月, 2019 1 次提交
-
-
由 Rafael Mendonça França 提交于
Now that secret_token was removed all this code is now dead.
-
- 21 11月, 2018 1 次提交
-
-
由 Gannon McGibbon 提交于
Raises an ArgumentError when multiple root routes are defined in the same context instead of assigning nil names to subsequent roots.
-
- 28 9月, 2018 2 次提交
-
-
由 Simon Courtois 提交于
This PR fixes an issue when the following situation occurs. If you define a class like this class MyConstraint def call(*args) # for some reason this is defined end def matches?(*args) # checking the args end end and try to use it as a constraint get "/", to: "home#show", constraints: MyConstraint.new if its `matches?` method returns `false` there will be an error for the mapper will ask for the constraint arity, thinking it is a proc, lambda or method. This PR checks for the presence of the `arity` method on the constraint calling it only if present, preventing the error while keeping the basic behavior.
-
由 Gannon McGibbon 提交于
-
- 13 5月, 2018 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up of #32605.
-
- 19 4月, 2018 1 次提交
-
-
由 Daniel Colson 提交于
This autocorrects the violations after adding a custom cop in 3305c78dcd.
-
- 17 2月, 2018 1 次提交
-
-
由 fatkodima 提交于
-
- 26 1月, 2018 1 次提交
-
-
由 Daniel Colson 提交于
-
- 14 12月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up of #31432.
-
- 28 11月, 2017 1 次提交
-
-
由 Andrew White 提交于
Fixes #31220.
-
- 25 9月, 2017 1 次提交
-
-
由 Michael Coyne 提交于
Using the action_dispatch.cookies_rotations interface, key rotation is now possible with cookies. Thus the secret_key_base as well as salts, ciphers, and digests, can be rotated without expiring sessions.
-
- 02 8月, 2017 2 次提交
-
-
由 eileencodes 提交于
Since this test changed in 92209356 I noticed that it really doesn't make sense anymore. I split the tests into 2 groups to explain what each one does. First these routes should throw a `bad_request` when the encoding isn't valid. We're expecting UTF8 encoding and passing binary, that should be a bad request. For the second test we are setting the `show` route to set `self.binary_params_for?` for that route which will convert the parameters and return a `:ok` instead of a `:bad_request`.
-
由 eileencodes 提交于
This commit changes the behavior such the path_params now default to UTF8 just like regular parameters. This also changes the behavior such that if a path parameter contains invalid UTF8 it returns a 400 bad request. Previously the behavior was to encode the path params as binary but that's not the same as query params. So this commit makes path params behave the same as query params. It's important to test with a path that's encoded as binary because that's how paths are encoded from the socket. The test that was altered was changed to make the behavior for bad encoding the same as query params. We want to treat path params the same as query params. The params in the test are invalid UTF8 so they should return a bad request. Fixes #29669 *Eileen M. Uchitelle, Aaron Patterson, & Tsukuru Tanimichi*
-
- 29 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 16 5月, 2017 1 次提交
-
-
由 yuuji.yaginuma 提交于
Currently, raise `BadRequest` if params encoding is invalid. https://github.com/rails/rails/blob/5-1-stable/actionpack/lib/action_dispatch/http/parameters.rb#L64..L74 https://github.com/rails/rails/blob/5-1-stable/actionpack/lib/action_dispatch/request/utils.rb#L26..L39 However, env values are ensure encoded in ASCII 8 BIT at rack 2.0.3. https://github.com/rack/rack/commit/68db9aa99e3e2775a58621f658b2a7a0f67db459 Therefore, even if specify an invalid urls, it will not cause an error.
-
- 19 4月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
Since this protection is now in Parameters we can use it instead of reimplementing again.
-
- 18 4月, 2017 1 次提交
-
-
由 Andrew White 提交于
The current check for whether to add an optional format to the path is very lax and will match things like `:format_id` where there are nested resources, e.g: resources :formats do resources :items end Fix this by using a more restrictive regex pattern that looks for the patterns `(.:format)`, `.:format` or `/` at the end of the path. Note that we need to allow for multiple closing parenthesis since the route may be of this form: get "/books(/:action(.:format))", controller: "books" This probably isn't what's intended since it means that the default index action route doesn't support a format but we have a test for it so we need to allow it. Fixes #28517.
-
- 16 3月, 2017 1 次提交
-
-
由 Andrew White 提交于
In 9b654d47 some params munging was added to ensure that they were set whenever `recognize_path` would call either a proc or callable constraint. Since we no longer mutate the environment hash within the method it's now unnecessary and actually causes params to leak between route matches before checking constraints. Fixes #28398.
-
- 26 2月, 2017 1 次提交
-
-
由 Andrew White 提交于
In ca324a0d the flash middleware was effectively removed by its constructor returning the app it was passed and the `commit_flash` call was moved to the `ActionController::Metal#dispatch` method. This broke any redirect routes that modified the flash because the redirect happens before `dispatch` gets called. To fix it, this commit adds a `commit_flash` call in the `serve` method of `ActionDispatch::Routing::Redirect`. Fixes #27992.
-
- 05 1月, 2017 1 次提交
-
-
由 Akira Matsuda 提交于
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
-
- 25 12月, 2016 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 10 10月, 2016 2 次提交
-
-
由 Rafael Mendonça França 提交于
Remove deprecated support for passing `:path` and route path as stings in `ActionDispatch::Routing::Mapper#match`
-
由 Rafael Mendonça França 提交于
-
- 03 10月, 2016 1 次提交
-
-
由 Chris Carter 提交于
Currently a misleading "missing required keys" error is thrown when a param fails to match the constraints of a particular route. This commit ensures that these params are recognised as unmatching rather than missing. Note: this means that a different error message will be provided between optimized and non-optimized path helpers, due to the fact that the former does not check constraints when matching routes. Fixes #26470.
-
- 03 9月, 2016 1 次提交
-
-
由 yuuji.yaginuma 提交于
This removes the following warning. ``` ./test/dispatch/routing_test.rb:3696: warning: method redefined; discarding old test_namespaced_roots ./test/dispatch/routing_test.rb:1632: warning: previous definition of test_namespaced_roots was here ```
-
- 02 9月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
-
- 29 8月, 2016 1 次提交
-
-
由 Ryo Hashimoto 提交于
The PR #20940 enabled the use of multiple roots with different constraints at the top level but unfortunately didn't work when those roots were inside a namespace and also broke the use of root inside a namespace after a top level root was defined because the check for the existence of the named route used the global :root name and not the namespaced name. This is fixed by using the name_for_action method to expand the :root name to the full namespaced name. We can pass nil for the second argument as we're not dealing with resource definitions so don't need to handle the cases for edit and new routes. Fixes #26148.
-
- 18 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Since e852daa6 only the verb methods where extracting the defaults options. It was merged a fix for the `root` method in 31fbbb7f but `match` was still broken since `:defaults` where not extracted. This was causing routes defined using `match` and having the `:defaults` keys to not be recognized. To fix this it was extracted a new private method with the actual content of `match` and the `:defaults` extracting was moved to `match`.
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
-