From c0e2a71b7b4081117d87c2c34c1b2afb8d511732 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sat, 13 Jan 2024 22:46:49 -0500 Subject: some request security updates --- .../src/RedisClientCacheEntry.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/VNLib.Data.Caching.Providers.Redis/src/RedisClientCacheEntry.cs b/plugins/VNLib.Data.Caching.Providers.Redis/src/RedisClientCacheEntry.cs index 7f2f3ed..f80c750 100644 --- a/plugins/VNLib.Data.Caching.Providers.Redis/src/RedisClientCacheEntry.cs +++ b/plugins/VNLib.Data.Caching.Providers.Redis/src/RedisClientCacheEntry.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Data.Caching.Providers.Redis @@ -328,10 +328,7 @@ namespace VNLib.Data.Caching.Providers.Redis public void Advance(int count) { - if(count < 0) - { - throw new ArgumentOutOfRangeException(nameof(count)); - } + ArgumentOutOfRangeException.ThrowIfNegative(count); _position += count; } -- cgit