mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-09-21 01:34:15 +00:00
chore: remove unreachable scope format check in consent
Signed-off-by: Trezy <tre@trezy.com>
This commit is contained in:
@@ -529,14 +529,6 @@ pub async fn consent_post(
|
||||
);
|
||||
}
|
||||
let approved_scope_str = final_approved.join(" ");
|
||||
let has_valid_scope = final_approved.iter().all(|s| is_valid_scope(s));
|
||||
if !has_valid_scope {
|
||||
return json_error(
|
||||
StatusCode::BAD_REQUEST,
|
||||
"invalid_request",
|
||||
"Invalid scope format",
|
||||
);
|
||||
}
|
||||
if form.remember {
|
||||
let preferences: Vec<ScopePreference> = presented_items
|
||||
.iter()
|
||||
|
||||
@@ -77,13 +77,6 @@ fn is_granular_scope(s: &str) -> bool {
|
||||
|| s.starts_with("identity:")
|
||||
}
|
||||
|
||||
fn is_valid_scope(s: &str) -> bool {
|
||||
!matches!(
|
||||
tranquil_pds::oauth::scopes::parse_scope(s),
|
||||
tranquil_pds::oauth::scopes::ParsedScope::Unknown(_)
|
||||
)
|
||||
}
|
||||
|
||||
fn extract_device_cookie(headers: &HeaderMap) -> Option<tranquil_types::DeviceId> {
|
||||
headers
|
||||
.get("cookie")
|
||||
|
||||
Reference in New Issue
Block a user