Unverified Commit df6e309f authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Profile: verify that timestamp is a timestamp

parent 65106639
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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;