swagger-api / swagger-js

Javascript library to connect to swagger-enabled APIs via browser or nodejs
http://swagger.io
Apache License 2.0
2.62k stars 758 forks source link

Escape regular expressions with values passed by the user #3505

Closed glowcloud closed 4 months ago

glowcloud commented 4 months ago

We need to escape regular expressions which are built with values passed by the user:

https://github.com/swagger-api/swagger-js/blob/43e55ec1d20c52b4b2410625c2db470082100c98/src/execute/index.js#L356

For this, we can use escapeRegExp function from the ramda-adjunct library.

char0n commented 4 months ago

Addressed in https://github.com/swagger-api/swagger-js/pull/3506