Commit 06835f1
Update cookie.rb to still allow old HMAC generation
I could be wrong, but I think that https://github.com/rack/rack/pull/1177/files is not backward compatible.
It still allows to verify old sessions cookies with the `--$HMAC` format when using a set of a legacy options, but it doesn't allow to create cookies sessions with the old `--$HMAC` format, even with `legacy_generate_hmac` and `legacy_hmac_secret` are set.
Comment in the code mentions this is backward compatible with the correct options, but still
```
if @Secrets.first
session_data << "--#{generate_hmac(session_data, @Secrets.first)}"
end
```
is removed and I don't see any other place where the `--$HMAC` could be set. This is adding it back.1 parent dadcfe6 commit 06835f1
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
| |||
0 commit comments