DpopInterceptor: isPdsApiRequest uses String.contains() for URL routing #42
Labels
No labels
auth
bug
composer
correctness
database
durability
enhancement
feeds
interactions
notifications
performance
reliability
safety
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starsetbyte/peregrine#42
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
DpopInterceptor.isPdsApiRequest()usedString.contains()with heuristic substrings (/.well-known/,/oauth/,plc.directory) to decide whether to apply DPoP. This is fragile — substrings can match in unexpected positions (query params, opaque path segments).Fix
Replaced with path-based routing: extract the URL path and check
path.startsWith("/xrpc/"). Positive match on what we WANT (XRPC endpoints) instead of negative exclusion of what we do not. Hand-written path extraction to avoid OkHttp deprecation issues.Updated
DpopInterceptorTestURLs from/api/testto/xrpc/app.bsky.feed.getTimelineso they actually match the new routing logic.Fixed in PR #36.