Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/api/registry/org/[org]/packages.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CACHE_MAX_AGE_ONE_HOUR, NPM_REGISTRY } from '#shared/utils/constants'
import { FetchError } from 'ofetch'

// Validation pattern for npm org names (alphanumeric with hyphens)
Comment thread
alexdln marked this conversation as resolved.
Outdated
const NPM_ORG_NAME_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i
const NPM_ORG_NAME_RE = /^[\w~-][\w.~-]*$/
Comment thread
alexdln marked this conversation as resolved.

function validateOrgName(name: string): void {
if (!name || name.length > 50 || !NPM_ORG_NAME_RE.test(name)) {
Expand Down
Loading