Code Monkey home page Code Monkey logo

get-shit-done's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

get-shit-done's Issues

Session alerts

Add session alerts (success/failure) to the following cases

  • Login / Logout
  • Register
  • Changing item priority
  • Add List
  • Remove List
  • Add Item
  • Edit List
  • Edit Item
  • Assign user to Item
  • Add user as admin
  • (Un)Complete task

Anything else? @diogotorres97 @cyrilico

Implement 'add task'

Implement adding new Item to the current list using ajax for no-redirect insertion. The mechanism is similar to the 'Add list' one.

Start here:
f075fd0

Update db on checkbox update

On a ToDo list's page, when the user clicks an item's checkbox, the db should update the 'complete' value for the item. Could use the specific sql calls for this.

Vulnerability tackling

Currently have the following variables which are retrieved from GET or POST superglobal variables and need regex filtering to ensure no malicious content is manually being sent by user:

Variable Type File where is encoutntered
id number list.php, l.20
id number action_add_item.php, l.9
description generic text action_add_item.php, l.10
title generic text action_add_list.php, l.9
category number action_add_list.php, l.11
id number action_delete_item.php, l.8
username username action_edit_myprofile.php, l.6
picture text/url action_edit_myprofile.php, l.6
name letter only text action_edit_myprofile.php, l.6
bio generic text action_edit_myprofile.php, l.6
username username action_login.php, l.5 & l.6
password password action_login.php, l.5
username username action_register.php, l.5
email email action_register.php, l.6
password password action_register.php, l.7
confirmPassword password action_register.php, l.8
itemID number action_update_complete.php, l.8
complete boolean action_update_complete.php, l.9
itemID number action_edit_item.php, l.8
description generic text action_edit_item.php, l.9
dueDate date action_edit_item.php, l.10

Regular expressions to test:

Type Regex Notes
username /^[a-zA-Z][\w-]{1,18}(?![-_])\w$/
password /^(?=.*\d)(?=.*[a-zA-Z])(?=.*["-_?!@#+*$%&/()=])["\w\-?!@#+*$%&/()=]{8,32}$/
number /^\d+$/
generic text /^[\w\s-?!\.()]*$/ Allows letters, numbers and most common punctuation
text/url /^https?://(?:[a-z-]+.)+[a-z]{2,6}(?:/[^\/#?]+)+.(?:jpe?g|gif|png)$/ Shamelessly copied from here, alter as necessary
letter only text /^[a-zA-Z ]+$/ Might have some problem for special chars like ç or any letter with an accent, check later
email Get it here Official regex used in input type="email" from W3C (couldn't escape some special chars properly here)
boolean /^0|1$/
date /^\d\d\d\d-\d{1,2}-\d{1,2}$/

To test a regex against a variable, simply use regex.test(variable). It shall return true if there is a match, and false otherwise

Updated until commit 61ccf0f

Create actions directory

Need to move all php actions (action_add_list.php, etc) to their own directory to keep the project's structure somewhat sane

Security Issues

After studying a bit and hacking our site, I conclude that there are aspects to be improved, of which:

  • (a) Path Traversal Attack

  • (b) SQL Injection (Done by @cyrilico and @ diogotorres97)

  • (c) Account Lockout

  • (d) Cross-site Scripting (XSS) (Almost done)

  • (e) Cross-site Rquest Forgery (CSRF)

  • (f) Man in the Middle Atack

  • (g) Credential Storage

  • (h) Session Fixation

  • (i) Session Hijacking (Depends on (h))

  • (j) DDos Attack (Probably FEUP is already secure against this type of attacks)

Brief explanation:
(a) This vulnerability allows anyone to download the database knowing the full path.
e.g. https://paginas.fe.up.pt/~up201506428/feup-ltw/project1/database/db.db

(c) It is necessary to prevent bruteforce attacks. So when a user tries to login incorrectly 3x show a captcha or lock the account for a certain amount of time.

[DONE] (d) It is necessary to activate session_set_cookie_params according to page 34 of the slides.

[DONE on delete and add lists] (e) It is necessary to prevent the most important actions using a random token per session (Pag.40)

(f) I think this is already implemented since the pages of feup are already certified.

[DONE] (g) It is necessary to change the manner that the passwords are stored to one using bcrypt with salt. (Pag.67)
[DONE] We also have to force usernames and emails to be case insensitive.

(h) It allows to login knowing the session_id of another user, making pass by him. Need to implement different id's for each request. (Page 77)

Optimize item addition

As the html markup of the .item class on https://github.com/antonioalmeida/feup-ltw/blob/master/project1/list.php becomes more complicated, should we create a separate action to retrieve it's html markup? This is only useful if it can be used when adding a new item.

Is it possible for 'action_add_item' to return the complete HTML markup for the item instead of just the newly added item's properties? Or should we make two action calls: one to add the item, one to retrieve the item's markup based on the item's properties. Need thoughts on this @cyrilico @diogotorres97

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.