Permalink
Browse files

CSRFのエラーチェック後の処理を修正

  • Loading branch information...
1 parent c836b8c commit adf01f8c565eed2f018e38a924d7d50a40b8f2f1 @nsyee nsyee committed Nov 8, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/controllers/chatroom.js
  2. +1 −1 lib/controllers/mypage.js
  3. +1 −1 lib/controllers/user.js
@@ -119,7 +119,7 @@ exports.create = function(req, res, next) {
//CSRF Check
if (_csrf !== req.param('token')) {
logger.error('CSRF Invalid');
- return;
+ return next(new Error());
}
//validation
@@ -292,7 +292,7 @@ exports.delete = function(req, res, next) {
//CSRF Check
if (_csrf !== req.param('token')) {
logger.error('CSRF Invalid');
- return;
+ return next(new Error());
}
//validation
@@ -51,7 +51,7 @@ exports.deactivation = function(req, res, next) {
//CSRF Check
if (_csrf !== req.param('token')) {
logger.error('CSRF Invalid');
- return;
+ return next(new Error());
}
User.deactivate(req.user.id, function(err) {
@@ -25,7 +25,7 @@ exports.create = function(req, res, next) {
//CSRF Check
if (_csrf !== req.param('token')) {
logger.error('CSRF Invalid');
- return;
+ return next(new Error());
}
//validation

0 comments on commit adf01f8

Please sign in to comment.