Commit Graph

189 Commits

Author SHA1 Message Date
Andrew Nicolaou 7fd226f3ad Removes hashedKey from APIKey data when serialising
This ensures it's not accidentally exposed to the client when returning
the key metadata
2019-05-29 12:51:50 -04:00
Andrew Nicolaou 69d5a87861 Fixes API controller tests
The tests mock the mogoose User model and the express Response model
which isn't good. We should find a solution that makes use of
the actual model object.
2019-05-29 12:51:50 -04:00
Andrew Nicolaou 7bfacf08d0 Do not return any keys in API 2019-05-29 12:51:50 -04:00
Andrew Nicolaou 403234ae81 Moves API key creation to server 2019-05-29 12:51:50 -04:00
Vertmo 3b55ff81d2 Hashing keys before storing them 2019-05-29 12:51:50 -04:00
Vertmo db71a2b7c0 Added DB schema and backend logic for API keys creation and deletion 2019-05-29 12:51:50 -04:00
Cassie Tarakajian df1219b47a
fixes #850, bundling external libraries was causing a callback to never be called (#1060) 2019-05-02 19:33:16 -04:00
Cassie Tarakajian 8b296a51aa
Fixes #1052, in which you can't save a sketch after uploading a file (#1053)
Fixes #1052, in which a user can't save a sketch after uploading a file
2019-04-24 13:32:23 -04:00
Cassie Tarakajian 7d1901649f
Project synching, for #790 (#1039)
* add isSaving to project reducer, move actions to functions, start work to get comprehensive frontend/backend syncing working

* handle making changes while saving project, handle saving from another window

* add change to handle saving new sketch, and adding new changes while saving
2019-04-17 14:08:33 -04:00
Ankur Ingale 80765e03c7 Fixed Issue #659 (#964)
* Fixed Issue #659

* Undo changes in package.json and package-lock.json

* Resolved error
2019-03-21 17:08:46 -04:00
siddhant1 b6e2c4c983 Migrated from momentjs to date-fns 2019-03-02 15:05:40 +05:30
Oliver Wright 03d7533e2a Serve text-type assets from sketch asset urls - Fixes #839 (#843) 2019-02-22 18:05:56 -05:00
Oliver Wright e75c98b299 Prevent Race Condition when Updating Project - Fixes #837 (#838) 2019-02-20 16:27:28 -05:00
Cassie Tarakajian 4dcec4baa8 Merge branch 'fix-char-restriction' of git://github.com/GaurangTandon/p5.js-web-editor into GaurangTandon-fix-char-restriction 2019-02-20 14:49:55 -05:00
Oliver Wright 00391a4ef9 Prevent User Information leak Fixes #822 (#823)
Prevents leaking the encrypted password and verification tokens to
the user when they update their account.
2019-02-20 11:08:10 -05:00
Gaurang Tandon 57b5f2f5bb resolve mc 2019-02-10 07:00:48 +05:30
Gaurang Tandon bd3eed5fd3 reverted some changes and changed to file system safe naming 2019-02-10 06:57:03 +05:30
Cassie Tarakajian 7bd016bac3
fixes #785, update node, and everything else that comes along with that (#810) 2019-01-16 17:56:18 -05:00
Gaurang Tandon 26d65396b4 fixes #568 2018-12-15 12:35:52 +05:30
anaplian 319e68ddb6 Fix async validation in signup form (fixes #742) (#746) 2018-10-29 19:33:37 -04:00
Cassie Tarakajian 54002feb1d change for #727 2018-10-16 11:43:16 -04:00
Cassie Tarakajian 088efaad0c another change for #727, getting warmer 2018-10-16 11:13:01 -04:00
Cassie Tarakajian 63380c5dd8 another change for #727 2018-10-16 10:58:12 -04:00
Cassie Tarakajian 032169e7bc add authorization to file routes 2018-09-19 16:09:12 -04:00
Liang Tang d5856ba923 Remove authorization from specific routes (#642)
* fixes #569

* update listObjectsInS3ForUser

* update client-side routes

* update aws controller

* update

* redirect to /login when unlogged in
2018-05-29 21:37:10 -07:00
Cassie Tarakajian 9ba507e091 fix server-side lint error 2018-05-08 19:30:33 -07:00
Cassie Tarakajian bd303b7710 fix even more linting errors 2018-05-08 19:16:04 -07:00
Cassie Tarakajian c90dac55b7 update eslint and fix linting errors 2018-05-08 19:16:04 -07:00
Cassie Tarakajian e70b9d618e fix linting errors 2018-02-20 14:22:33 -05:00
Cassie Tarakajian f05abfcb9a fix for #552 2018-02-20 14:16:58 -05:00
Mr.tang 27d4013585 Fixes #520 (#538)
* Fix #520

* delete consoles

* restore

* return 404 from server side

* fix lint error

* add sketch check for user
2018-02-19 15:21:47 -05:00
Mr.tang 6f5472020c Fixes #517 (#530)
* update download file's name

* fix lint error

* use moment.js

* slugify filename

* fix lint error
2018-02-13 11:28:06 -05:00
Cassie Tarakajian 3307613aec
adds slugify feature for #522 (#523) 2018-02-07 16:00:09 -05:00
Cassie Tarakajian fb1684ce4b add isAuthenticated middleware, add isAuthenticated middleware to certain routes, make all other routes consistent 2018-01-09 15:57:49 -05:00
Francis Li 76a81bb1a0 Fixes #497 by adding support for an optional new env variable, S3_BUCKET_URL_BASE (#499)
* Fixes #497 by adding support for an optional new env variable, S3_BUCKET_URL_BASE

* Add a section to README about optional S3 bucket URL base configuration.
2017-12-13 14:56:24 -05:00
Cassie Tarakajian e38474ce40 fix linting errors 2017-11-27 17:32:03 -05:00
Cassie Tarakajian d03b433cfe add additional logging for CSRF errors, redirect to 404 for invalid embed path 2017-11-27 16:58:53 -05:00
Cassie Tarakajian 28c2bda663 remove console logs to figure out getProjectAsset crash 2017-11-27 16:06:59 -05:00
Cassie Tarakajian 286c725407 add more debugging to getProjectAsset 2017-11-27 15:43:58 -05:00
Cassie Tarakajian 3b33f3acca catch getProjectAsset error 2017-11-27 15:14:50 -05:00
Cassie Tarakajian c30aba8e78 fix lingering linting errors 2017-10-15 20:27:05 -07:00
Cassie Tarakajian 63b47319d4 fix merge conflict 2017-08-01 16:07:21 -04:00
Zach Rispoli e987e8f483 Bundle libraries when project is downloaded as zip (New approach) (#376)
* External libraries are bundled with zip when project is downloaded (#44)

* Fix linting errors

* Add a check for valid URLs before trying to bundle a library into project

* Add is-url lib to package.json
2017-07-19 19:56:52 +02:00
Cassie Tarakajian 4684feaff6 fix #394 2017-07-14 15:35:02 -04:00
Cassie Tarakajian e140702784 Create Asset List View and refactor overlay code (#356)
* start to create asset list

* begin refactoring overlay component to remove duplicate code

* refactoring of overlays, asset list styles

* changes to add size to asset list

* fixes to asset list

* handle case in which a user hasn't uploaded any assets

* fix bug in which asset list only grabbed first asset

* remove console.log

* update overlay exit styling to use icon mixin
2017-07-11 17:37:43 +02:00
Cassie Tarakajian 4476405021 change all email links to update protocol based on node env 2017-06-26 13:48:24 -04:00
Andrew Nicolaou 1dc0c22cb7 Email verification (#369)
* Re-introduce Email Verification code

Revert "Revert "Email verification""
This reverts commit d154d8bff259350523a0f139e844db96c43d2ee1.

* Uses MJML to generate Reset Password email

* Sends Password Reset and Email Confirmation emails using MJML template

* Sends verified status along with user data

* API endpoint for resending email verification confirmation

* Displays verification status on Account page and allows resending

* Send back error string

* Passes email address through to sign/verify helper

* Uses enum-style object to set verified state

* Sends minimal info when user verifies since it can be done without login

* Provides /verify UI and sends confirmation token to API

* Better name for JWT secret token env var

* Adds mail config variables to Readme

* Encrypts email address in JWT

The JWT sent as the token in the Confirm Password URL
can be unencoded by anyone, although it's signature can only
be verified by us. To ensure that no passwords are leaked,
we encrypt the email address before creating the token.

* Removes unused mail templates

* Resets verified flag when email is changed and sends another email

* Moves email confirmation functions next to each other

* Extracts random token generator to helper

* Moves email confirmation actions into Redux

- updates the AccountForm label with a message to check inbox
- show status when verifying email token

* Uses generated token stored in DB for email confirmation

* Sets email confirmation status to verified if logging in from Github

* Sends email using new method on account creation

* Fixes linting errors

* Removes replyTo config
2017-06-26 12:48:28 -04:00
Cassie Tarakajian 1ae37ebaaa fix lingering linting errors 2017-06-13 16:47:36 -04:00
Zach Rispoli 396fc701c7 Fix issue with serving assets inside folders 2017-06-12 13:49:45 -04:00
Zach Rispoli 61afce46ed Server can serve individual assets from projects (fixes #212, fixes #219) 2017-06-01 00:08:11 -04:00
Cassie Tarakajian 7deb3745bf fix #354 2017-05-13 22:23:07 -04:00
Cassie Tarakajian 15346c9a00 more to test object copying 2017-05-13 21:46:58 -04:00
Cassie Tarakajian dc9ad0eea9 log errors in s3 object copy 2017-05-13 21:38:48 -04:00
Cassie Tarakajian 3c6049ceef duplicate is probably less broken than it was 2017-05-13 21:17:58 -04:00
Cassie Tarakajian 2a9ea85ed8 #339 add region to .env 2017-04-13 14:39:03 -04:00
Cassie Tarakajian 40b3e26f24 #339 make duplication backwards compatible with old s3 links 2017-04-13 14:17:30 -04:00
Cassie Tarakajian aaa5e868e2 make inital changes for #169--need to migrate the locations of a user's s3 files to be namespaced under their userid 2017-04-06 14:34:14 -04:00
Cassie Tarakajian 23560c7879 delete file from s3 if data environment variable is undefined 2017-04-05 23:23:38 -04:00
Cassie Tarakajian 8392acdf3f delete files based on S3, with a date to be backwards compatible 2017-04-05 23:23:38 -04:00
Cassie Tarakajian 75b49d10a9 add function to delete file from s3 2017-04-05 23:23:38 -04:00
Cassie Tarakajian fa04054d28 duplicating files works 2017-04-05 23:23:38 -04:00
Cassie Tarakajian f01a58353b initial commit to cloning files on S3, untested 2017-04-05 23:23:37 -04:00
Yining Shi fe6acc90e4 Adding User Settings View (#325)
* added account page showing username and email

* change username and email

* validate current password and add new  password

* reject promise with error for reduxForm submit-validation for current password

* updated user reducer to handle setting sucess and server side async

* warning if there is current password but no new password

* fixes logout button

* import validate function, fixes logout style
2017-03-16 18:25:12 -04:00
Cassie Tarakajian 1e49b678c4 temporarily remove stale project thing 2017-03-15 11:59:07 -04:00
Cassie Tarakajian abbeb7fc60 fi linting to include .jsx files 2017-03-02 15:18:58 -05:00
Cassie Tarakajian fe4c2641e3 fix #254, stale project warning works correctly, removed unused actions and state for ide 2017-03-02 14:38:29 -05:00
Cassie Tarakajian e87390adb9 update eslint to latest version, fix lots of linting errors (#308)
* update eslint and dependencies, fix linting errors that can be fixed with --fix

* fix lots of linting errors

* update eslintrc, fix some linting errors

* fix all server side linting errors, untested

* fix errors that fixing linting errors had caused

* fix client side eslint errors

* fix client side linting errors

* fix refs lint errors

* fix more linting errors

* update eslint and dependencies, fix linting errors that can be fixed with --fix

* fix lots of linting errors

* update eslintrc, fix some linting errors

* fix all server side linting errors, untested

* fix errors that fixing linting errors had caused

* fix client side eslint errors

* fix client side linting errors

* fix refs lint errors

* fix more linting errors

* fix some accessibility linting errors

* fix a lot of linting errors

* fix a billion more linting errors

* hopefully fix all linting errors, still need to test

* fix bugs that fixing linting had caused
2017-02-22 14:29:35 -05:00
Cassie Tarakajian a59efb2583 #254 remove warning for stale project, needs to be tested more 2017-01-25 13:39:20 -05:00
Cassie Tarakajian 0c6246fe45 fix linting errors 2017-01-24 17:20:40 -05:00
Cassie Tarakajian a9ee70e033 #254 show error when user attempts to save stale version of project, refactor error modals to one component 2017-01-24 15:29:25 -05:00
Cassie Tarakajian 1a22998ff8 warn user of session change when deleting a project or saving a new project 2017-01-17 15:37:19 -05:00
Cassie Tarakajian 65592cbf9e add authentcation error component, return 403 error from server when trying to save a project where the user doesn't match the owner 2017-01-17 15:37:19 -05:00
Cassie Tarakajian 311e8442a1 Revert "Email verification" (#265) 2017-01-13 10:35:39 -05:00
Akarshit Wal 2d781e22fb Email verification (#230)
* Making the email separate for future enhancements

* email-verification added

* Github users are verified

* update package

* Bug fixes and improvements

* jade to pug

* Bug fix

* changed route
2017-01-13 10:24:09 -05:00
Cassie Tarakajian fc8318c297 fix some linting errors 2017-01-11 15:50:36 -05:00
Enrique Piqueras 5e4b076b93 Fixed #158 and #100 (#198)
* Changed unsaved changes asterisk to an svg circle. #158

* Fixed #100
Unmatched routes are handled by react-router on the client side
and a single wildcard route on server.routes.js renders the index
html.
When the /:username/sketches route is matched and the username is not
valid, the user will be redirected to the index route and a toast
will explain what happened. When the username is 'p5' (default when
logged out) it will show all sketches. Maybe this should be changed
to just public or 'local' sketches?

* Moved unsaved changes SVG to a separate file.

* User not found is now a 404 error.

* Added server rendered 404 page.

* Removed console.log

* 404 Page now renders a random p5 sketch. TODO: make 404 sketches.

* Added 404 header
404 page now fetches a random example sketch

* Moved circle closer to file name

* Render 404 page in SketchList route if !user
2017-01-06 13:08:03 -05:00
Cassie Tarakajian 9e61382e87 #182 possible fix to password reset 2016-12-13 13:28:01 -05:00
Cassie Tarakajian 5dd0220610 fix baseURL for preview frame 2016-11-30 12:38:53 -05:00
Cassie Tarakajian af3cb60ce1 fix linting errors that are fixable with --fix in server side code 2016-11-17 11:15:35 -05:00
Cassie Tarakajian 04922522cc cool to share some of this code between client and server
Squashed commit of the following:

commit fb5e82cea930b011792983c7d1cc9f6ecacc7dd4
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Wed Nov 16 12:28:10 2016 -0500

    add server side rendering, untested

commit 5c60fb30c46ea49a8d9a0ecb56f39ec778464a8b
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Tue Nov 15 18:26:06 2016 -0500

    add redux-form bandage post react update, should probably update to redux-form 6 at some point

commit 057b5871e7137179abc93f7821a9690f0ea52c92
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Tue Nov 15 16:30:09 2016 -0500

    remove passing jsFiles and cssFiles to PreviewFrame, fix rendering bug

commit 88c56fd36d3a8d88902c79642171988ce37825f2
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Tue Nov 15 16:21:59 2016 -0500

    code cleanup, untested

commit 82e5dcf8bca461892f1daf06d38f1eaebe72983f
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Tue Nov 15 15:53:50 2016 -0500

    update react and react router, fix a few bugs in rendering code, add ability to parse inline js and css

commit e02f4b67803ea45328eff4e53659222f3149964c
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Tue Nov 15 14:43:38 2016 -0500

    add almost full code to create preview html correctly, untested

commit 12f61b2a1aed4607fab24d01572b647ca6210262
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Wed Nov 2 17:09:26 2016 -0400

    refactor some of the preview html generation code

commit 111825846703d5c8959cb18795a3aadb7ebe505c
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Wed Nov 2 11:06:36 2016 -0400

    add comments as plan of action

commit 1cc2cf5203674732b4057382f1937de38b687078
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Thu Oct 27 19:34:55 2016 -0400

    add href parsing

commit e67189298cda9b70645f454ecd541a363980f0e4
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Thu Oct 27 10:48:36 2016 -0400

    continue parsing html

commit 1458fb940a15a3dc5d74890211a3073e920b84b8
Author: Cassie Tarakajian <ctarakajian@gmail.com>
Date:   Wed Oct 26 17:40:31 2016 -0400

    start to add html parsing
2016-11-16 13:12:36 -05:00
Cassie Tarakajian 2750b1f0ef #189 i have literally been putting this off for months but i finally figured out now to resolve file paths \ 😄 / 2016-11-08 16:50:21 -05:00
Cassie Tarakajian 081c7d521e #189 load text files from server via filename, does not work for file paths 2016-11-08 14:42:23 -05:00
Cassie Tarakajian b06fb4cb80 change p5.js password reset email 2016-11-02 18:08:28 -04:00
Cassie Tarakajian 85b8f5b589 fixes #96, downloads now work on safari and firefox 2016-11-02 14:08:53 -04:00
Cassie Tarakajian e66b916349 change password reset email address 2016-10-19 12:36:58 -04:00
Cassie Tarakajian 70f1c1c8f1 update email copy 2016-10-19 12:36:58 -04:00
Cassie Tarakajian e5ff11f65a add basic password reset functionality, no error checking or styling 2016-10-19 12:36:58 -04:00
Cassie Tarakajian d055aa5af8 more password reset things 2016-10-19 12:36:58 -04:00
Cassie Tarakajian 5aa5032961 create password reset token from FE, start to add flash text 2016-10-19 12:36:58 -04:00
Cassie Tarakajian ea6d30c430 more password reset stuff 2016-10-19 12:36:57 -04:00
kaganjd 76bd1b1630 Add ability to delete projects from sketch list (#125)
* Add ability to delete projects from sketch list

- Fixes #76
- Also gets rid of outdated Sketch module

* Styling for Sketch List trash can

* Merge all the stuff

* Fix trash can line height
2016-10-12 14:24:53 -04:00
catarak 207bab20eb add embed route, fix path parsing in PreviewFrame 2016-09-06 16:54:16 -04:00
catarak 69bb0d0077 adding and deleting files works server side 2016-09-02 19:02:38 -04:00
catarak 3dfed2a11e delete files works, server side 2016-09-02 17:41:01 -04:00
catarak 34fe78d734 create file works server side 2016-09-02 17:41:01 -04:00
catarak c8074f1501 do a lot of things that aren't really working 2016-09-02 17:41:01 -04:00
catarak ac6585e713 add file works on unsaved project 2016-09-02 17:41:01 -04:00
catarak 1d86d766d9 add login error for invalid username or password 2016-09-02 17:31:07 -04:00
catarak 3b6bfbc552 check for duplicate email and username 2016-09-02 14:51:30 -04:00
catarak 64b2ea3da4 add and test logout 2016-08-27 20:46:20 -04:00