fix on padding index validation for base64

This commit is contained in:
lucas.hipolito 2025-07-10 11:00:22 +02:00
parent 9346595d80
commit fe08794f09

View file

@ -102,7 +102,7 @@ public static class ContentTypeExtensions
switch (paddingIndex)
{
// Padding cannot be at index 0
case <= 0:
case 0:
// Padding must be at the end
case > 0 when paddingIndex < s.Length - 2:
// All characters after first '=' must also be '='