Bug: Hex not working when uppercase

This commit is contained in:
split / May 2023-08-27 17:38:59 -07:00
parent 9089f876a2
commit 5afc025851

View file

@ -166,7 +166,7 @@ authRoutes.post("/embedcolor", requiresAccount, parser, (req,res) => {
if ( if (
!req.body.color !req.body.color
|| (req.body.color.toLowerCase().match(/[a-f0-9]+/) == req.body.color) || (req.body.color.toLowerCase().match(/[a-f0-9]+/) == req.body.color.toLowerCase())
&& req.body.color.length == 6 && req.body.color.length == 6
) { ) {
@ -458,4 +458,4 @@ authRoutes.get("/customCSS", (req,res) => {
res.send("") res.send("")
} }
} else res.send("") } else res.send("")
}) })