Skip to content

Commit

Permalink
fix(lib): polynomial redos
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Oct 28, 2023
1 parent 45ab836 commit d26d6a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spec/openapi/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function normalizeUrl (url, serverUrls, stripBasePath) {

function resolveServerUrls (servers) {
const resolvedUrls = []
const findVariablesRegex = /\{(.*?)\}/gu // As for OpenAPI v3 spec url variables are named in brackets, e.g. {foo}
const findVariablesRegex = /\{([^{}]+)\}/gu // As for OpenAPI v3 spec url variables are named in brackets, e.g. {foo}

servers = Array.isArray(servers) ? servers : []
for (const server of servers) {
Expand Down

0 comments on commit d26d6a2

Please sign in to comment.