Преглед на файлове

handle validation fails correctly

George Baugh преди 5 месеца
родител
ревизия
63f48e2c02
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      lib/TPSGI.pm

+ 3 - 0
lib/TPSGI.pm

@@ -741,6 +741,9 @@ sub route {
     # GET, POST, URI captures, then explicit data overrides.
     my $query = $self->extract_query( $path, $route, $env );
 
+	# We failed validation if $query isn't a hashref.
+	return $query if ref $query eq 'ARRAY';
+
     # allow this stuff to survive down to the end of some routes
     $query->{last_fetched} = $last_fetch;
     $query->{deflate}      = $deflate;