/journey/🆔 verify that id is numeric

As a side effect, this turns the response of GET /journey/edit (which should
never happen in the first place) from an exception into a 404 error (#36)
This commit is contained in:
Daniel Friesel 2020-01-19 19:15:53 +01:00
parent 243302b9bb
commit 2764826da0

View file

@ -657,7 +657,7 @@ sub journey_details {
$self->param( journey_id => $journey_id );
if ( not($journey_id) ) {
if ( not( $journey_id and $journey_id =~ m{ ^ \d+ $ }x ) ) {
$self->render(
'journey',
error => 'notfound',