angel3_security 10.0.0
angel3_security: ^10.0.0 copied to clipboard
Angel3 infrastructure for improving security, rate limiting, and more
Change Log #
10.0.0 #
Breaking changes in 10.0.0 #
- Breaking:
RateLimiter.handleRequestreturns whatrejectRequestreturns, as documented, where it always returnedfalse. The defaultrejectRequeststill throws a 429
New in 10.0.0 #
CsrfFilter, a middleware against cross-site request forgery: requests that change state must come from an allowed origin (Sec-Fetch-Site,OriginorReferer) and send back the value of the signed, session-boundXSRF-TOKENcookie, in theX-XSRF-TOKENheader (as axios and Angular do) or a_csrfform field. The cookie holds an HMAC of the session id, not the id. The token of a request is aCsrfTokenin its container. Seeexample/csrf.dartCookieSigner.readPayload, the payload of a properly signed cookie
Fixes in 10.0.0 #
- Security:
CookieSignercompares signatures in constant time, where the time leaked how much of a forged signature was right, and signs the UTF-8 bytes of a value CookieSigner: A value containing.is verified, where it was always refused, and a signed cookie keeps itsSameSite, where signing dropped itInMemoryRateLimiter: Ended windows are removed, and after the clock is set back, those that start later too, where one was kept for every user (e.g. every IP) ever seenRetry-After: Rounded up, and at least 1, where a client could be told to retry after 0 seconds while the window lasted- Docs: The README tells how to install and use the package, and how to migrate from 9.x, and
RateLimitertells that requests of one user at the same time may together exceed the limit, unless the store updates windows atomically - Tests: Cover
CookieSignerand the rate limiters
9.1.0 #
- Require Dart >= 3.13
9.0.0 #
- Require Dart >= 3.12
8.4.0 #
- Require Dart >= 3.8
- Updated
lintsto 6.0.0 - Updated dependencies to the latest release
8.3.0 #
- Require Dart >= 3.6
- Updated
lintsto 5.0.0 - Updated dependencies to the latest release
8.2.0 #
- Require Dart >= 3.3
- Updated
lintsto 4.0.0
8.1.1 #
- Updated repository link
8.1.0 #
- Updated
lintsto 3.0.0 - Fixed linter warnings
8.0.0 #
- Require Dart >= 3.0
7.0.0 #
- Require Dart >= 2.17
6.0.1 #
- Fixed AngelHttpException error
6.0.0 #
- Require Dart >= 2.16
5.0.0 #
- Skipped release
4.0.0 #
- Skipped release
3.1.0 #
- Updated linter to
package:lints
3.0.1 #
- Run
dartfmt -w .to correct the formating - Updated example
3.0.0 #
- Migrated to support Dart >= 2.12 NNBD
2.0.0-alpha.1 #
- Make
ServiceRateLimitermore fail-proof.
2.0.0-alpha #
- Angel 2 updates. Remove previous functionality.
- Add
CookieSigner,RateLimiter/InMemoryRateLimiter/ServiceRateLimiter