Repository navigation
Fix compatability, id cookies, and binding:file; add safety-limits [1.6] - #84
Conversation
This commit changes the functions provided by `web-server/http/id-cookie` to accept byte-strings for their name and value arguments (rather than requiring strings) for consistency with other cookie-related functions: see <RenaissanceBug/racket-cookies@c745ee5>. Additionally, it fixes a bug which had caused cookie HMAC-SHA1 signatures to be incorrectly truncated to 25 base64 digits, rather than 27, since <racket@a5135d5>. Other minor fixes: - Corrects the documentatation for `valid-id-cookie?` and `request-id-cookie` to specify that the `#:timeout` argument must satisfy `real?` (not just `number?`). - Changes the test suite for `make-secret-salt/file` to avoid needing write permissions for the directory where the collection is installed. Closes racket#74
|
Here are some of the things that seem debatable: Response timeouts:
|
| (lambda (in) | ||
| (let loop ([bindings null]) | ||
| (match (match-query-key in) | ||
| (match (regexp-try-match #rx#"^([^=&]+)([=&]?)" in) ;; query key |
There was a problem hiding this comment.
Not a big deal, but I think the way this used to be was slightly clearer and it made it easier to test out the regexps in a REPL.
|
Re: Configuration Tables --- There are A LOT of features that these do not support and they have not been maintained in a very very long time, easily a decade. I don't think we should remove the command line tool, but it doesn't have feature parity now and couldn't feasibly have it. |
|
I've pushed another batch of changes that are still broken. I'm aiming to wrap this up by the end of the week. |
|
It's looking like "the end of the week" was a bit overly optimistic, and I'm going to have limited connectivity for roughly the next week, but I should be able to finish not long after the new year. |
|
I am having a hard time debugging one last test failure. In the CI tests, I am getting the failure I am not sure how to figure out more precisely what is going wrong. With some tweaks to "all-e2e-tests.rkt" so I can comment out some cases, it looks like the There is one more substantive commit for the revisions to |
5b0a4e8 to
e0fcb9f
Compare
|
I've squashed the history for this PR: the details are at https://github.com/LiberalArtist/web-server/tree/wrap-up-1.6-history. |
It's surprising that It looks like |
|
@LiberalArtist this patch gets the e2e tests passing. |
e0fcb9f to
54a6765
Compare
Also, fix a few compatability issues, particularly with signatures.
Avoid exposing the mutator or unprotected constructors, even via reflective operations, while preserving `binding:file` as a transparent struct for compatability.
This version reflects commits starting with 66b79c8 by Jesse Alama, @mflatt, @Bogdanp, @aymanosman, @samth, and @jeapostrophe: - Adds many new protections against malicious or misbehaving clients, which are controled with a new `safety-limits?` abstraction. - Adds `response/empty` constructor. - Fixes bugs with `dispatch/servlet` and HMAC-SHA1 signatures for id cookies. - Allows bytes in addition to strings as arguments to `web-server/http/id-cookie` functions for consistency.
54a6765 to
d8c3289
Compare
|
I think this is complete! (Finally!) Thanks @Bogdanp for walking me through how the new limits should work. |
|
I've run the same attacks against this branch as I did against my own PR and I don't see any regressions, which is great! I also ran matchacha.ro's end-to-end test suite as well as played around with the website myself locally and everything is working fine. I'll do another pass over the changes and the new documentation in the morning, but this has a 👍 from me so far. I'm not sure exactly what the branching process as part of a release is for this repo in particular, so I figured I'd ask: is there a chance that cc @samth |
|
Whatever was in master as of January 7 is currently slated for the release. The manager for this repo, @jeapostrophe, can have anything he thinks appropriate replace that default until January 15. After January 15, any change requires a discussion among the release managers. It sounds like Jay should decide whether to revert some commits to avoid backward-incompatibility (for now) or add new commits to get things into long-term shape. |
|
I think that we should add these commits for the long-term, unless someone sees any big problems by tomorrow, in which case, we should revert and continue working on this path. |
I'm still cleaning up various things in the
safety-limitscommit—most notably, I haven't adjusted the tests—and finishing another commit for thebinding:fileedge cases, but I thought I'd open a PR now to solicit comments. See #77 and #75 (comment) for earlier discussion.As I proposed in #82 (comment), when we have consensus on the API changes, I plan to increment the
web-server-libversion to1.6and open a corresponding PR in https://github.com/racket/typed-racket fortyped/racket/http.