This commit is contained in:
split / May 2023-05-11 19:25:34 -07:00
parent 78de4764bc
commit 7699258159
2 changed files with 3 additions and 3 deletions

View file

@ -142,8 +142,8 @@ authRoutes.post("/customcss", parser, (req,res) => {
}
if (typeof req.body.fileId != "string") return
if (id_check_regex.test(req.body.fileId) && req.body.fileId.length <= config.maxUploadIdLength) {
if (req.body.fileId.match(id_check_regex) == req.body.fileId && req.body.fileId.length <= config.maxUploadIdLength) {
acc.customCSS = req.body.fileId
if (!req.body.fileId) delete acc.customCSS
Accounts.save()

View file

@ -170,7 +170,7 @@
</div>
<button on:click={() => accOpts.customcss(optPicker)}>
<img src="/static/assets/icons/paint.svg" alt="logout_all">
<img src="/static/assets/icons/paint.svg" alt="customcss">
<p>Set custom CSS<span><br />{@html $account.customCSS ? `Using file ID <span class="number">${$account.customCSS}</span>` : "No custom CSS set"}</span></p>
</button>