mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Fix ReDos in CSS_RGB and CSS_RGBA
This commit is contained in:
parent
51d1a37b00
commit
1e1aecb579
@ -58,7 +58,7 @@ const INTERPRETATIONS = [
|
||||
|
||||
CSS_RGB: {
|
||||
read: function(original) {
|
||||
const test = original.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
||||
const test = original.match(/^rgb\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
|
||||
if (test === null) {
|
||||
return false;
|
||||
}
|
||||
@ -76,7 +76,7 @@ const INTERPRETATIONS = [
|
||||
|
||||
CSS_RGBA: {
|
||||
read: function(original) {
|
||||
const test = original.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
||||
const test = original.match(/^rgba\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
|
||||
if (test === null) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user