mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Revert "base64Decode: clearer error message when an invalid character is detected"
We have a safer way of doing this.
This reverts commit dc3ccf02bf
.
This commit is contained in:
parent
68ba6ff470
commit
d0c351bf43
1 changed files with 2 additions and 3 deletions
|
@ -243,9 +243,8 @@ std::string base64Decode(std::string_view s)
|
||||||
if (c == '\n') continue;
|
if (c == '\n') continue;
|
||||||
|
|
||||||
char digit = base64DecodeChars[(unsigned char) c];
|
char digit = base64DecodeChars[(unsigned char) c];
|
||||||
if (digit == npos) {
|
if (digit == npos)
|
||||||
throw Error("invalid character in Base64 string: '%c' in '%s'", c, s.data());
|
throw Error("invalid character in Base64 string: '%c'", c);
|
||||||
}
|
|
||||||
|
|
||||||
bits += 6;
|
bits += 6;
|
||||||
d = d << 6 | digit;
|
d = d << 6 | digit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue