mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
Revert "base64Decode: clearer error message when an invalid character is detected"
We have a safer way of doing this. This reverts commitdc3ccf02bf
. (cherry picked from commitd0c351bf43
)
This commit is contained in:
parent
b523e4de34
commit
1e03ea386b
@ -260,9 +260,8 @@ std::string base64Decode(std::string_view s)
|
||||
if (c == '\n') continue;
|
||||
|
||||
char digit = base64DecodeChars[(unsigned char) c];
|
||||
if (digit == npos) {
|
||||
throw Error("invalid character in Base64 string: '%c' in '%s'", c, s.data());
|
||||
}
|
||||
if (digit == npos)
|
||||
throw Error("invalid character in Base64 string: '%c'", c);
|
||||
|
||||
bits += 6;
|
||||
d = d << 6 | digit;
|
||||
|
Loading…
Reference in New Issue
Block a user