Commit graph

811 commits

Author SHA1 Message Date
Gonzalo
8d9c884d40
Merge branch 'master' into dalli3-and-rails7 2022-01-29 15:51:25 -03:00
Gonzalo
d2040063fb
Merge branch 'ruby-3-1' 2022-01-29 15:39:18 -03:00
Gonzalo
9ccf6286d1
Merge pull request #565 from orhantoy/include-license-in-gem-build
Include LICENSE in gem build
2022-01-29 15:37:06 -03:00
Gonzalo
501ab01573
ci: run tests against ruby 3.1 2022-01-29 15:36:58 -03:00
Gonzalo
aaeff6d0ae
feat: deprecate throttled_response and blocklisted_response 2022-01-29 15:22:19 -03:00
Gonzalo
8bf9d4efad
refactor: attempt to make method name more self explanatory and clear 2022-01-29 15:06:13 -03:00
Orhan Toy
c95f9624aa
Include LICENSE in gem build 2022-01-28 19:04:52 +01:00
Gonzalo
a92513fb3e
Merge pull request #562 from johlym/patch-1
Update README to mention .clear_configuration
2022-01-18 09:40:06 -03:00
Johnathan Lyman
4e90859a37
Update README to mention .clear_configuration
Adds a line to the Test case isolation section about `.clear_configuration`.
2022-01-17 12:25:43 -08:00
Gonzalo
7bcd3b1529
ci: update rubies 2021-12-15 11:59:52 -03:00
Gonzalo
e31488aeba
Merge pull request #558 from agbaber/fix-rack-spec-doc-link
docs: update link to rack spec in README
2021-11-26 13:26:41 -03:00
Andrew Baber
78bc155ac9 docs: update link to rack spec in README 2021-11-19 12:34:50 -05:00
thomas morgan
2fc8c7b65f support rails 7.0 2021-11-17 11:33:17 -07:00
Gonzalo
f920e635f6
Merge pull request #557 from zarqman/dalli3
Test against dalli 3.0
2021-11-16 16:18:04 -03:00
thomas morgan
0fbfda0146 test against dalli 3.0 2021-11-16 10:04:16 -07:00
Gonzalo
1a872aa24c
docs: update CI badge 2021-07-21 19:16:32 -03:00
Gonzalo
a20d58e022
ci: update machine os 2021-07-21 18:59:09 -03:00
Gonzalo
511efd15c9
ci: update rubies 2021-07-21 18:58:13 -03:00
Gonzalo
7f2ccca650
ci: run GitHub Actions CI for pull requests 2021-07-21 18:52:11 -03:00
Gonzalo
50b9f37156
ci: move from TravisCI to GitHub Actions 2021-07-19 21:27:02 -03:00
Gonzalo
17b7368a95
docs: attempt to avoid README version confusion 2021-06-15 12:29:14 -03:00
Gonzalo
2257f00876
docs: update 'How can I help?' section 2021-03-21 18:28:59 -03:00
Gonzalo
886ba3a18d
Merge branch '6-stable' 2021-02-07 16:46:46 -03:00
Gonzalo
12a8390d2d
Bump gem version to v6.5 2021-02-07 13:34:46 -03:00
Gonzalo
f3f0df3fc0
refactor: attempt to avoid user confusion by clarifying method is used by throttle 2021-02-07 13:34:26 -03:00
brchristian
0f1a72a4d4
Use single quotes in example configuration 2021-02-07 13:02:33 -03:00
Gonzalo
d1b01f0b4a
test: update ruby and rails versions 2021-02-07 13:02:16 -03:00
fatkodima
1e5fb868f6
Auto include middleware for older railses 2021-02-07 12:57:24 -03:00
fatkodima
e131750a6b
Make store proxies lookup dynamic 2021-02-07 12:56:50 -03:00
fatkodima
df354cd141
Make discriminators case-insensitive by default 2021-02-07 12:55:03 -03:00
Gonzalo Rodriguez
23f7e7f53b
Merge pull request #514 from brchristian/patch-1
Use single quotes in example configuration
2021-01-24 13:04:47 -03:00
Gonzalo
1c460b179e
Merge branch '6-stable' 2021-01-23 22:38:36 -03:00
Gonzalo
6328ddcb19
Bump gem version to v6.4 2021-01-23 21:26:11 -03:00
Gonzalo
33d1bac4a5
test: update ruby and rails versions 2021-01-23 21:26:11 -03:00
fukayatsu
dda2489936
Fix Ruby 2.7 kwargs warning in RedisCacheStoreProxy
(cherry picked from commit 9020201ff5)
2021-01-23 13:55:48 -03:00
Joe Van Dyk
38c89afcf3
Fix speling in README
(cherry picked from commit 7b3376021b)
2021-01-23 13:55:48 -03:00
Gonzalo
6316069638
docs: update repo references after move to rack org
(cherry picked from commit 26476670f4)
2021-01-23 13:55:48 -03:00
Gonzalo
476144ee40
build: update rubocop to earlier version fixing the LineLength crash
(cherry picked from commit cbae022df1)
2021-01-23 13:55:47 -03:00
Eliot Sykes
1cd4a1cd79
Mitigate login throttle bypasses in docs
This commit mitigates rate limit bypasses in the configuration
docs by normalizing the email throttle key. (The normalization process
used is the same as used by the Clearance gem.)

---

Often an authentication process normalizes email addresses and usernames
before look up, say by downcasing and removing any whitespace.

Throttles that do not perform the same normalization are vulnerable
to rate limit bypasses.

For example, an attacker can bypass a vulnerable throttle by using
unlimited case and whitespace variants for the same email address:

- Variant 1: `victim@example.org`
- Variant 2: `victim@example. org` (one whitespace)
- Variant 3: `victim@example.  org` (two whitespaces)
- Variant 4: `ViCtIm@eXaMpLe.org`
- etc, etc.

All of these variants resolve to the same email address, but allow
an attacker to bypass a vulnerable throttle. To mitigate, the email
throttle key should be normalized using the same logic the
authentication process uses for normalizing emails.

(cherry picked from commit 03926e0b75)
2021-01-23 13:55:47 -03:00
Tristan Toye
48531f546c
Clarify Calling HTTP_APIKey header in example (#488)
* Clarify Calling HTTP_ header in example

In trying to track down a bug here turns out I was trying to reference the wrong header shown in the readme.

Printing our `request.env` it becomes clear this is just the full request object:

```
{"rack.version"=>[1, 3],
 "rack.errors"=>#<IO:<STDERR>>,
 "rack.multithread"=>true,
 "rack.multiprocess"=>false,
 "rack.run_once"=>false,
 "SCRIPT_NAME"=>"",
 "QUERY_STRING"=>"",
 "SERVER_PROTOCOL"=>"HTTP/1.1",
 "SERVER_SOFTWARE"=>"puma 4.3.5 Mysterious Traveller",
 "GATEWAY_INTERFACE"=>"CGI/1.2",
 "REQUEST_METHOD"=>"POST",
 "REQUEST_PATH"=>"/api/v1/....",
 "REQUEST_URI"=>"/api/v1/...",
 "HTTP_VERSION"=>"HTTP/1.1",
 "HTTP_HOST"=>"example.com",
 "HTTP_APIKEY"=>"secret_key",
 "CONTENT_TYPE"=>"application/json",
 "HTTP_USER_AGENT"=>"PostmanRuntime/7.25.0",
 "HTTP_ACCEPT"=>"*/*",
 "HTTP_CACHE_CONTROL"=>"no-cache",
...
```

* Update README.md

(cherry picked from commit f92889b360)
2021-01-23 13:55:47 -03:00
Olle Jonsson
44b6a7353a
Use RuboCop 0.84.0
- this enables each of the new Cops and marks each with the version
they appeared in

(cherry picked from commit c07fcdde43)
2021-01-23 13:55:46 -03:00
Ryan Laughlin
9da0bb7712
Consolidate #testing section of README
(cherry picked from commit 029b5481fe)
2021-01-23 13:55:46 -03:00
Lukas Spieß
614e10aa9c
Use gender-neutral pronoun in Readme
(cherry picked from commit 58b4042e35)
2021-01-23 13:55:45 -03:00
fatkodima
1d2c646ae1
Remove support for ruby 2.3
(cherry picked from commit 56361ab56b)
2021-01-23 13:55:21 -03:00
brchristian
5945fbcdf5
Use single quotes in example configuration 2021-01-16 10:19:33 -08:00
Gonzalo
55d5e370fd
test: update ruby and rails versions 2020-12-27 16:57:15 -03:00
Gonzalo Rodriguez
e40c3dda44
Merge pull request #509 from fukayatsu/fix-ruby-2.7-kw-warnings-on-increment
Fix Ruby 2.7 kwargs warning in RedisCacheStoreProxy
2020-12-27 00:31:32 -03:00
Gonzalo Rodriguez
1cb24da681
Merge pull request #512 from joevandyk/patch-1
Fix speling in README
2020-12-26 00:12:36 -03:00
Gonzalo
26476670f4
docs: update repo references after move to rack org 2020-12-25 23:51:59 -03:00
Gonzalo
cbae022df1
build: update rubocop to earlier version fixing the LineLength crash 2020-12-25 23:47:14 -03:00