Fixed security analysis warnings
This commit is contained in:
parent
45218176c7
commit
729a7740db
3 changed files with 7 additions and 3 deletions
|
@ -92,7 +92,9 @@ class CookieSigner {
|
||||||
///
|
///
|
||||||
/// See [createSignedCookie].
|
/// See [createSignedCookie].
|
||||||
void writeCookies(ResponseContext res, Iterable<Cookie> cookies) {
|
void writeCookies(ResponseContext res, Iterable<Cookie> cookies) {
|
||||||
cookies.forEach((c) => writeCookie(res, c));
|
for (var c in cookies) {
|
||||||
|
writeCookie(res, c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new cookie, replacing the value of an input
|
/// Returns a new cookie, replacing the value of an input
|
||||||
|
@ -104,7 +106,7 @@ class CookieSigner {
|
||||||
/// Where `sig` is the cookie's value, signed with the [hmac].
|
/// Where `sig` is the cookie's value, signed with the [hmac].
|
||||||
Cookie createSignedCookie(Cookie cookie) {
|
Cookie createSignedCookie(Cookie cookie) {
|
||||||
return cookieWithNewValue(
|
return cookieWithNewValue(
|
||||||
cookie, cookie.value + '.' + computeCookieSignature(cookie.value));
|
cookie, '${cookie.value}.${computeCookieSignature(cookie.value)}');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new [Cookie] that is the same as the input
|
/// Returns a new [Cookie] that is the same as the input
|
||||||
|
|
|
@ -35,7 +35,7 @@ class RateLimitingWindow<User> {
|
||||||
|
|
||||||
factory RateLimitingWindow.fromJson(Map<String, dynamic> map) {
|
factory RateLimitingWindow.fromJson(Map<String, dynamic> map) {
|
||||||
return RateLimitingWindow(
|
return RateLimitingWindow(
|
||||||
(map['user'] as User?)!,
|
(map['user'] as User),
|
||||||
DateTime.parse(map['start_time'] as String),
|
DateTime.parse(map['start_time'] as String),
|
||||||
int.parse(map['points_consumed'] as String));
|
int.parse(map['points_consumed'] as String));
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@ dev_dependencies:
|
||||||
angel3_validate: ^7.0.0
|
angel3_validate: ^7.0.0
|
||||||
belatuk_pretty_logging: ^5.0.0
|
belatuk_pretty_logging: ^5.0.0
|
||||||
test: ^1.21.0
|
test: ^1.21.0
|
||||||
|
logging: ^1.0.0
|
||||||
|
resp_client: ^1.2.0
|
||||||
lints: ^2.0.0
|
lints: ^2.0.0
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
angel3_production:
|
angel3_production:
|
||||||
|
|
Loading…
Reference in a new issue