snoopysecurity / dvws-node

Damn Vulnerable Web Services is a vulnerable application with a web service and an API that can be used to learn about webservices/API related vulnerabilities.
GNU General Public License v3.0
442 stars 173 forks source link

QOL - Update node to v16.14.0, update python to v3.7.12, add image name to docker-compose.yml #26

Closed lacksfish closed 2 years ago

lacksfish commented 2 years ago

Update node and python, add image name in docker-compose, package.json update

Summary

For node v13 I did not manage to install the dependencies (I think node-gyp failed, I forgot) Next i changed the node docker image to v16, which resulted in further issues because some node dependency needed python above 3.6 for the install. Unfortunately, only python 3.5 was available on the previous docker image node:13.14.0-stretch-slim. Instead of manually building/installing python 3.7 in the Dockerfile, I settled on the docker image nikolaik/python-nodejs:python3.7-nodejs16-slim

Further, package.json dependency "express-fileupload" specific version can alternatively also be fetched from NPM, like every other dependency in the project already is. Not depending on git/github for this one dependency has the benefit of solving potential install issues related to how git pulls the data (SSH, which might not be accessible on all installs)

Other changes:

I'm open to discussing which changes are reasonable, I'm basically just sharing and summarizing what I did to setup the project ✌️

lacksfish commented 2 years ago

I've also replaced all external CDN links pointing to CSS or JavaScript files with local files installed through NPM. This helps when running this project in an offline environment.

For upload.html a different angular version was used. 1.1.1 instead of 1.3.9. I'm assuming this is on purpose and I've included angular1.1.1.min.js in the public/static folder. I did not manage to npm install angular 1.1.1 as it led to errors while installing.

snoopysecurity commented 2 years ago

Nice PR, your changes looks good, i ll merge