Permit no slash in management auth URL handling

A slash is appended to the `base_url`, however most NIP-98 clients sign the URL without the slash.
This commit is contained in:
insumisos 2026-10-26 22:51:05 +01:00 committed by GitHub
parent 411f16ad18
commit ef0553b0eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,7 @@ pub async fn check_auth(request: Request<Incoming>) -> Result<(Pubkey, Value), E
format!("{}", uri)
};
if actual_url != auth_url {
if actual_url.trim_end_matches('/') != auth_url.trim_end_matches('/') {
return s_err(&format!(
"Authorization event URL {} does not match requqest URL {}",
auth_url, actual_url