diff --git a/lib/Lacuna/RPC/Building/SpacePort.pm b/lib/Lacuna/RPC/Building/SpacePort.pm index 6afa95ce..fa76b894 100644 --- a/lib/Lacuna/RPC/Building/SpacePort.pm +++ b/lib/Lacuna/RPC/Building/SpacePort.pm @@ -248,6 +248,11 @@ sub find_arrival { my $now = DateTime->now; my $year = $arrival_params->{year} ? $arrival_params->{year} : $now->year; my $month = $arrival_params->{month} ? $arrival_params->{month} : $now->month; + + if ($month < 1 or 12 < $month) { + confess [1002, 'Invalid month']; + } + my $mon_end = DateTime->last_day_of_month(year => $year, month => $month); my $day = $arrival_params->{day}; my $hour = $arrival_params->{hour}; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index a2114560..1ff8acd9 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,6 +1,7 @@ 3.0917: - Fix: Recalc stats when building 1+x plans. - Fix: Station incoming shows your incoming as own, not station owner's incoming. + - Fix: Better input validation for fleet. 3.0916: - Mod: Jackpot enhanced.