Skip to content

Commit

Permalink
use a less dramatic log message
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 7, 2014
1 parent c5ad9b7 commit e704f47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -391,10 +391,7 @@ sub _signed_cookie {
}
if ($valid) { push @results, $value }

else {
$self->app->log->debug(
qq{Bad signed cookie "$name", possible hacking attempt.});
}
else { $self->app->log->debug(qq{Cookie "$name" has bad signature.}) }
}

else { $self->app->log->debug(qq{Cookie "$name" not signed.}) }
Expand Down
5 changes: 2 additions & 3 deletions t/mojolicious/group_lite_app.t
Expand Up @@ -274,9 +274,8 @@ $cb = $t->app->log->on(message => sub { $log .= pop });
$t->get_ok('/bridge2stash')->status_is(200)
->content_is(
"stash too!cookie!!signed_cookie!!bad_cookie--12345678!session!flash!\n");
like $log, qr/Cookie "foo" not signed\./, 'right message';
like $log, qr/Bad signed cookie "bad", possible hacking attempt\./,
'right message';
like $log, qr/Cookie "foo" not signed\./, 'right message';
like $log, qr/Cookie "bad" has bad signature\./, 'right message';
ok $t->tx->res->cookie('mojolicious')->httponly,
'session cookie has HttpOnly flag';
$t->app->log->unsubscribe(message => $cb);
Expand Down

0 comments on commit e704f47

Please sign in to comment.