From feee3052e6990966c33ea6df0659d1842804b07a Mon Sep 17 00:00:00 2001 From: npt-1707 Date: Mon, 18 May 2026 04:01:35 +0800 Subject: [PATCH] static/static/rest_framework/js/coreapi-0.1.1.js: Security fix for ReDoS --- static/static/rest_framework/js/coreapi-0.1.1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/static/rest_framework/js/coreapi-0.1.1.js b/static/static/rest_framework/js/coreapi-0.1.1.js index 3c5a2be..2026cab 100644 --- a/static/static/rest_framework/js/coreapi-0.1.1.js +++ b/static/static/rest_framework/js/coreapi-0.1.1.js @@ -55,7 +55,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons var utils = require('../utils'); function trim(str) { - return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); } function getCookie(cookieName, cookieString) {