diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-01-19 19:21:14 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-19 19:21:14 +0100 |
commit | 9232cdaa5fd098c4db6a49d475d089babf7debf9 (patch) | |
tree | 4ecbdf68f988398051720f605825b82b9e22166b | |
parent | 2764826da00d31230a0f9a4c294b0ca050b73d4f (diff) |
Return HTTP 404 for unknown journeys
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index bd8832c..70d701b 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -660,6 +660,7 @@ sub journey_details { if ( not( $journey_id and $journey_id =~ m{ ^ \d+ $ }x ) ) { $self->render( 'journey', + status => 404, error => 'notfound', journey => {} ); @@ -683,6 +684,7 @@ sub journey_details { else { $self->render( 'journey', + status => 404, error => 'notfound', journey => {} ); @@ -743,6 +745,7 @@ sub edit_journey { if ( not( $journey_id =~ m{ ^ \d+ $ }x ) ) { $self->render( 'edit_journey', + status => 404, error => 'notfound', journey => {} ); @@ -759,6 +762,7 @@ sub edit_journey { if ( not $journey ) { $self->render( 'edit_journey', + status => 404, error => 'notfound', journey => {} ); |