Skip to content

Commit

Permalink
fix(route/rss3): should not contain path
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Oct 24, 2024
1 parent 74f8320 commit c840798
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/routes/rss3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ export const route: Route = {
async function handler(ctx) {
const { account, network, tag } = ctx.req.param();

// Check if account contains "://"
if (account.includes('://')) {
throw new Error('Account should not contain "://"');
// Check if account contains "://" or "/"
if (account.includes('://') || account.includes('/')) {
throw new Error('Account should not contain "://" or path components');
}

const { data } = await ofetch(
Expand Down

0 comments on commit c840798

Please sign in to comment.