mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-29 13:51:02 +00:00
security fix
This commit is contained in:
@@ -69,8 +69,9 @@ app.whenReady().then(async () => {
|
||||
request.url.slice("gradient:".length)
|
||||
);
|
||||
|
||||
// Fixed regex to prevent ReDoS - removed nested quantifiers and backtracking
|
||||
const match = gradientCss.match(
|
||||
/linear-gradient\(([^,]+),\s*([^,]+),\s*([^)]+)\)/
|
||||
/^linear-gradient\(([^,()]+),\s*([^,()]+),\s*([^,()]+)\)$/
|
||||
);
|
||||
|
||||
let direction = "45deg";
|
||||
|
||||
Reference in New Issue
Block a user