CS5331 Assignment 1 Project Reference Repository
- Cai Guoyuan Aaron
- Jin Tianma
- Rakkappan Lakshmanan
- Sun Zelun
Answer: Backend:
- Python+Flask
- Sqlite3
- flask-sqlalchemy for database interaction / ORM
- marshmallow-sqlalchemy for input validation
- bcrypt for password hashing
Frontend:
- JavaScript
- HTML
- Bootstrap 4
Security:
- DOMPurifier
Implemented
- Access Control for pages (prevent users who have not logged from accessing sensitive pages)
- Use DOMPurifier to escape output string before displaying
- bcrypt for password hashing, which makes use of random salt, and even with the same input, the output hash will be different. This kind of protect against brute-forcing.
Not Implemented:
- Set timer for token expiry date
Question 3: Are there any improvements you would make to the API specification to improve the security of the web application?
Answer: The documentation does not follow RESTful API. E.g. The api for deleting a diary should use 'DELETE' method instead of 'POST' and the api for changing permission should use 'PUT' method instead of 'POST'
Answer: We have access control on front end pages, only logged in user can view create and private diary pages.
Question 5: Is your web application vulnerable? If yes, how and why? If not, what measures did you take to secure it?
Answer: Yes, there are some vulnerabilities in our web application.
- The app does not use SSL so the website can be tampered. (MIM attack, network attacks)
- The token is stored in localStorage which is vulnerable to XSS
- We rely a lot on third party libraries, therefore, the website is as vulnerable as the strength of the libraries used.
- We rely on JavaScript to control page redirection which will encounter some issues if user's browser disabled javascript.
Answer: Consider to include vagrant in this assignment, since most of us are not using ubuntu OS as our daily drive, so it might be useful to introduce vm concept to kick start our assignment.
- Cai Guoyuan Aaron
- Wrote Front-end pages
- Wrote documentation
- Wrote RESTApi
- Jin Tianma
- Wrote Front-end pages
- Wrote RESTApi
- Rakkappan Lakshmanan
- Wrote Front-end pages
- Implement DOMPurifier to escape user input when displaying
- Wrote documentation
- Wrote RESTApi
- Sun Zelun
- Wrote dockerfile
- Wrote RESTApi
- Wrote Front-end pages
- Designed database
- Wrote documentation





