mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
style(gateway): format secret masking changes
This commit is contained in:
@@ -4,8 +4,7 @@ use crate::handlers::admin::provider::shared::support::{
|
|||||||
};
|
};
|
||||||
use crate::handlers::admin::request::AdminAppState;
|
use crate::handlers::admin::request::AdminAppState;
|
||||||
use crate::handlers::admin::shared::{
|
use crate::handlers::admin::shared::{
|
||||||
decrypt_catalog_secret_with_fallbacks, json_string_list, take_secret_prefix,
|
decrypt_catalog_secret_with_fallbacks, json_string_list, take_secret_prefix, take_secret_suffix,
|
||||||
take_secret_suffix,
|
|
||||||
};
|
};
|
||||||
use crate::handlers::public::matches_model_mapping_for_models;
|
use crate::handlers::public::matches_model_mapping_for_models;
|
||||||
use crate::{GatewayError, LocalProviderDeleteTaskState};
|
use crate::{GatewayError, LocalProviderDeleteTaskState};
|
||||||
|
|||||||
@@ -1647,10 +1647,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn masked_catalog_api_key_handles_unicode_plaintext_without_panicking() {
|
fn masked_catalog_api_key_handles_unicode_plaintext_without_panicking() {
|
||||||
let state = AppState::new().expect("gateway should build");
|
let state = AppState::new().expect("gateway should build");
|
||||||
let encrypted_api_key = encrypt_python_fernet_plaintext(
|
let encrypted_api_key =
|
||||||
DEVELOPMENT_ENCRYPTION_KEY,
|
encrypt_python_fernet_plaintext(DEVELOPMENT_ENCRYPTION_KEY, "测试-密钥-1234567890")
|
||||||
"测试-密钥-1234567890",
|
|
||||||
)
|
|
||||||
.expect("api key ciphertext should build");
|
.expect("api key ciphertext should build");
|
||||||
let key = StoredProviderCatalogKey::new(
|
let key = StoredProviderCatalogKey::new(
|
||||||
"key-unicode".to_string(),
|
"key-unicode".to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user