diff options
| -rwxr-xr-x | lib/Travelynx/Controller/Profile.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Profile.pm b/lib/Travelynx/Controller/Profile.pm index 978e3f8..8f3a1b2 100755 --- a/lib/Travelynx/Controller/Profile.pm +++ b/lib/Travelynx/Controller/Profile.pm @@ -369,6 +369,21 @@ sub user_status { return; } + if ( not $ts =~ m{ ^ \d+ [.]? \d* $ }x ) { + $self->respond_to( + json => { + json => { error => 'bad request (invalid timestamp)' }, + status => 400, + }, + any => { + template => 'bad_request', + message => 'Invalid timestamp', + status => 400 + } + ); + return; + } + my $my_user; my $relation; my $inverse_relation; |
