summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-14 18:39:54 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-14 18:39:54 +0100
commitdf6e309f32df50cbc86f8f577000b54917e86392 (patch)
tree95eb398292362d3411acdc3ba01f164fdc325626
parent65106639021295a898c9c81f17eaa49b5d464341 (diff)
Profile: verify that timestamp is a timestampHEAD2.17.33main
-rwxr-xr-xlib/Travelynx/Controller/Profile.pm15
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;