-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/budget template doc on plan page #431
Feature/budget template doc on plan page #431
Conversation
…it at plan details
…ix publishAsConcept
ideaBudgets.splice(indexToDelete, 1); | ||
} | ||
|
||
console.log(JSON.stringify({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed?
const promises = []; | ||
req.files.forEach((file, i) => { | ||
const attachmentsPath = 'public/uploads/attachments/resource-form-uploads/' + req.body.resourceId; | ||
const path = `${attachmentsPath}/${file.originalname}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original filename moet hier eigenlijk een random string zijn. Dit omdat elke gebruiker die inloggen kan een bestand kan uploaden hier naar toe. Als een hacker dit filepath dus kan raden en evt toegang krijgt via een andere exploit om een bestand uit te voeren op de server kan deze dus een bestand uploaden via dit formulier dat code uitvoert. De hacker weet dan precies waar dit bestand leeft op de disk en kan deze dan dus uitvoeren.
Gezien er verder ook geen checks worden gedaan op het type bestand (https://github.com/sindresorhus/file-type) kan dus alles worden geupload.
packages/cms/lib/modules/resource-form-widgets/public/js/main.js
Outdated
Show resolved
Hide resolved
const indexToDelete = ideaBudgets.findIndex(d =>{ | ||
return d.name === data.name}); | ||
|
||
if(indexToDelete > -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code om file te verwijderen van disk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💯
Description
Please include
Issue reference
Fixes # (issue)
Type of change
Is it a new feature, bug fix, code improvement, etc.
If it is a breaking change what needs to be done to fix that
Documentation
Is the documentation updated, maybe a link
Tests
(How) has the change been tested
Branch
If the branch to merge to is not development