mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-01 17:19:24 +00:00
The Slack channel capabilities.json declares secret names in lowercase (slack_bot_token) but the web UI stored them in UPPERCASE (SLACK_BOT_TOKEN), causing credential injection to fail with "not_authed". Changes: - CreateSecretParams::new() normalizes name to lowercase on creation - All SecretsStore lookups (get, exists, delete, is_accessible) now lowercase the name parameter before querying - Applied to all three backends: PostgreSQL, libSQL, InMemory - CredentialInjector::is_secret_allowed() uses case-insensitive comparison Co-authored-by: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f62937d482
commit
ec31e83a7d
@@ -235,14 +235,16 @@ impl CredentialInjector {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
/// Check if a secret name is in the allowed list.
|
||||
/// Check if a secret name is in the allowed list (case-insensitive).
|
||||
fn is_secret_allowed(&self, name: &str) -> bool {
|
||||
let name_lower = name.to_lowercase();
|
||||
for pattern in &self.allowed_secrets {
|
||||
if pattern == name {
|
||||
let pattern_lower = pattern.to_lowercase();
|
||||
if pattern_lower == name_lower {
|
||||
return true;
|
||||
}
|
||||
if let Some(prefix) = pattern.strip_suffix('*')
|
||||
&& name.starts_with(prefix)
|
||||
if let Some(prefix) = pattern_lower.strip_suffix('*')
|
||||
&& name_lower.starts_with(prefix)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user