Commit graph

216 commits

Author SHA1 Message Date
Francis Li
82ca755362 Fixes #489, only logs request in development (#490) 2017-12-08 14:50:53 -05:00
Cassie Tarakajian
03eae2f1ef fixes #479 and fixes #449 2017-11-28 14:48:50 -05:00
Cassie Tarakajian
e38474ce40 fix linting errors 2017-11-27 17:32:03 -05:00
Cassie Tarakajian
44f02d1159 add csrf token debugging 2017-11-27 17:26:32 -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
fd284358c2 fix #466 2017-10-30 15:36:09 -04:00
Cassie Tarakajian
c30aba8e78 fix lingering linting errors 2017-10-15 20:27:05 -07:00
Akarshit Wal
20bc8633d7 Login and signup page not visible after login (#431)
* Login and signup page not visible after login

* Redirect added on server side
2017-09-29 11:52:20 -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
57402cca8b catch migration error 2017-07-11 11:53:38 -04:00
Cassie Tarakajian
0bac435c72 debug asset migration 2017-07-11 11:51:56 -04:00
Cassie Tarakajian
3b36cd1e9c fix asset migration script 2017-07-11 11:50:23 -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
0532990314 update p5 version to latest 2017-06-26 15:11:42 -04:00
Andrew Nicolaou
6cbc376d6e CSRF/XSS protection (#374)
* /api endpoints only allows requests with application/json Content-Type

Otherwise sends 406 Unacceptable

* Uses CSRF token

The CSRF token is sent as the cookie 'XSRF-TOKEN' on all HTML page
requests. This token is  picked up automatically by axios
and sent to the API with all requests as an 'X-XSRF-TOKEN' header.
The middleware runs on all routes and verifies that the token matches
what's stored in the session.
2017-06-26 13:58:58 -04: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
Mathura MG
82207a50d3 Accessibility (#361)
* add p5 interceptor submodule

* update package

* remoce interceptor

* update interceptor;

* merge scripts

* change postinstall script

* refactor interceptor files

* remove merge conflicts

* change source files

* add registry class

* provide seperate outputs for text and grid

* switch textOutput to boolean

* make both modules usable together

* update interceptor for safari

* fix grid label

* add sound output as well

* change file strucure

* change constants

* change input lables

* switch submodule branch

* change variable name

* change grid to table

* remove role from table elements

* switch submodule branch
2017-05-31 15:23:30 -04:00
Cassie Tarakajian
8e1a65daed fixes #344, update sketches to by default use p5 version 0.5.10 2017-05-24 12:20:38 -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
66833d22b6 fix #351, increase limit for body-parser 2017-05-10 15:07:40 -04:00
Andrew Nicolaou
ae668f681e HTTPS UI switch (#335)
* Checkbox to toggle project's serveSecure flag

This doesn't yet persist or reload the page.

* Help button that shows modal to explain feature

* Extracts protocol redirection to helper

* Returns promise from saveProject() action to allow chaining

* Setting serveSecure flag on project redirects after saving project

* Set serveSecure on Project model in API and client

* Redirect to correct protocol when project is loaded
2017-05-03 11:46:12 -04:00
Cassie Tarakajian
a4a1a36f02 #330 add google analytics 2017-04-13 14:49:45 -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
Andrew Nicolaou
7be45ce875 Search for existing user account using Github emails (#337)
* Tries to match user account from list of emails in Github API

Requests the 'user:email' scope from Github which returns the private
emails associated with the user's account.

* Centres GitHub button in layout
2017-04-13 12:04:10 -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
Andrew Nicolaou
dc801ccf7f Force HTTPS redirection for log in and sign up (#319)
* Higher-order component to force some routes to HTTPS

* Force all user-management routes to HTTPS

* Redirect to sourceProtocol as route unmounts.

By default, no redirection occurs if sourceProtocol is not explicitly
defined.

* Sets serveSecure flag on new projects and usea after forcing protocol

The flag is set to `false` on all projects and as the UI has no way to
change this, it always redirects to HTTP after a signup/login action.

* Move HoC to be with other top-level components

* Server should respond to account page request

* Serves AccountView over HTTPS

* Turns HTTPS redirection off in development by default

Will log to the browser console any redirection that would
have happened. Added a line in the README about how to
enable this for testing in development.
2017-03-30 12:36:26 -04:00
Andrew Nicolaou
a1121e2e6b Enable CORS for all origins and requests on API (#324)
* Enable CORS for all origins and requests on API

* Whitelist CORS origins: *.p5js.org in production and also localhost in development
2017-03-23 14:53:16 -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