Update base64 requirement from 0.13.0 to 0.21.5 (#10336)

# Objective

- Update base64 requirement from 0.13.0 to 0.21.5.
- Closes #10317.

## Solution

- Bumped `base64` requirement and manually migrated code to fix a
breaking change after updating.
This commit is contained in:
Martín Maita 2023-12-20 21:55:54 -03:00 committed by GitHub
parent dc8fc6cb34
commit 3b59dbd772
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ gltf = { version = "1.3.0", default-features = false, features = [
"utils",
] }
thiserror = "1.0"
base64 = "0.13.0"
base64 = "0.21.5"
percent-encoding = "2.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"

View file

@ -1448,7 +1448,7 @@ impl<'a> DataUri<'a> {
fn decode(&self) -> Result<Vec<u8>, base64::DecodeError> {
if self.base64 {
base64::decode(self.data)
base64::Engine::decode(&base64::engine::general_purpose::STANDARD_NO_PAD, self.data)
} else {
Ok(self.data.as_bytes().to_owned())
}