MiniFacebook
Huu Ha Nguyen
Kartik Desai
Study Secure Programming Principles and Practices
In this final project, we have applied secure programming principles and practices and web development technologies to develop a simple yet secure “miniFacebook” web application with the all technical requirements. We have focused on all the aspects of project Design,Implemetaion and Mainly Security.
Our basic approach for the database project was to take understand the basic prototype (developed in PHP/mySQL) and optimize the database design.
- Database has following functionality :-
- Add/Get User.
- Create Post.
- Add/Edit Post
- Add comment
- Handle auth for chat system
- Design Idea : - taken from Original Facebook
- We have primarily used Html,Css,Javascript ,Jquery, PHP.
- html , css to create basic pages and layout.
- Javascript and Jquery to manipulate DOM.
- All this things are embedded in Php as our main focus was to secure application which php can do best.
Users and Superusers can be seprated based on their role 0/1
Users can :-
- Anyone can register for an account
- Registered users can (if the account is not disabled) =>
- Login
- Change password
- Add a new post
- Edit their own posts
- Add comments on any post
Superusers can :-
- Login (Database added directly in the database, no registration)
- Disable (not delete) a registered user
- Enable a registered user
- Logged-in users can have real-time chat with others
- We have done Input Validation.
- We are deploying the application over HTTPS for this project we are using self signed certicate.
- We are handling small erros e.g Trying to log in without providng credentials.
- We have implemented Encapsulation.
- We have seprated privileged/super and normal user
- Session Hijacking is prevented as it has specific lifetime and it will be accessed over secure https connection only and also the broswer as a user agent.
- we are generate a token, store it in the session and sending it to the client to re-verify to prevent CSRF Attacks.
- For Preventing xss(Cross-Site Scripting) attack we are using htmlentities which function converts characters to HTML entities. We can validate sql statements using prepared statements(Parameterized Queries). So attacks can be prevented.
- Passwords are hashed in database for security.













