chore: sync repository to current working state
Some checks failed
Build and Test / Build Server (Linux) (push) Has been cancelled
Build and Test / Build Agent (Windows) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Build Summary (push) Has been cancelled
Run Tests / Test Server (push) Has been cancelled
Run Tests / Test Agent (push) Has been cancelled
Run Tests / Code Coverage (push) Has been cancelled
Run Tests / Lint and Format Check (push) Has been cancelled
Some checks failed
Build and Test / Build Server (Linux) (push) Has been cancelled
Build and Test / Build Agent (Windows) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Build Summary (push) Has been cancelled
Run Tests / Test Server (push) Has been cancelled
Run Tests / Test Agent (push) Has been cancelled
Run Tests / Code Coverage (push) Has been cancelled
Run Tests / Lint and Format Check (push) Has been cancelled
Brings azcomputerguru/guru-connect up to the authoritative working copy that had been maintained in the claudetools monorepo: Phase 1 security and infrastructure (middleware, metrics, utils, token blacklist, deployment scripts, security audits) plus the native-remote-control integration spec. Preserves the repo .gitignore, .cargo, and server/static/downloads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -347,7 +347,7 @@ pub fn is_protocol_handler_registered() -> bool {
|
||||
}
|
||||
|
||||
/// Parse a guruconnect:// URL and extract session parameters
|
||||
pub fn parse_protocol_url(url: &str) -> Result<(String, String, Option<String>)> {
|
||||
pub fn parse_protocol_url(url_str: &str) -> Result<(String, String, Option<String>)> {
|
||||
// Expected formats:
|
||||
// guruconnect://view/SESSION_ID
|
||||
// guruconnect://view/SESSION_ID?token=API_KEY
|
||||
@@ -355,7 +355,7 @@ pub fn parse_protocol_url(url: &str) -> Result<(String, String, Option<String>)>
|
||||
//
|
||||
// Note: In URL parsing, "view" becomes the host, SESSION_ID is the path
|
||||
|
||||
let url = url::Url::parse(url)
|
||||
let url = url::Url::parse(url_str)
|
||||
.map_err(|e| anyhow!("Invalid URL: {}", e))?;
|
||||
|
||||
if url.scheme() != "guruconnect" {
|
||||
@@ -368,8 +368,9 @@ pub fn parse_protocol_url(url: &str) -> Result<(String, String, Option<String>)>
|
||||
|
||||
// The session ID is the first path segment
|
||||
let path = url.path().trim_start_matches('/');
|
||||
info!("URL path: '{}', host: '{:?}'", path, url.host_str());
|
||||
let session_id = if path.is_empty() {
|
||||
return Err(anyhow!("Missing session ID"));
|
||||
return Err(anyhow!("Invalid URL: Missing session ID (path was empty, full URL: {})", url_str));
|
||||
} else {
|
||||
path.split('/').next().unwrap_or("").to_string()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user