bump base64 from 0.10 to 0.21 (#29804)

* bump base64 from 0.10 to 0.21

* Fix configuration of bitflags

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Tuna 2023-08-03 00:25:37 +03:00 committed by GitHub
parent ad0fa77456
commit 4c8db6af87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 103 additions and 86 deletions

View file

@ -9,6 +9,7 @@ use crate::filemanager_thread::{FileManager, FILE_CHUNK_SIZE};
use crate::http_loader::{determine_requests_referrer, http_fetch, HttpState};
use crate::http_loader::{set_default_accept, set_default_accept_language};
use crate::subresource_integrity::is_response_integrity_valid;
use base64::Engine;
use content_security_policy as csp;
use crossbeam_channel::Sender;
use devtools_traits::DevtoolsControlMsg;
@ -659,7 +660,8 @@ async fn scheme_fetch(
if let Some((secret, bytes)) = data {
let secret = str::from_utf8(secret).ok().and_then(|s| s.parse().ok());
if secret == Some(*net_traits::PRIVILEGED_SECRET) {
if let Ok(bytes) = base64::decode(&bytes[1..]) {
if let Ok(bytes) = base64::engine::general_purpose::STANDARD.decode(&bytes[1..])
{
context.state.extra_certs.add(bytes);
}
}