diff --git a/app/Http/Middleware/Services/LookingGlass.php b/app/Http/Middleware/Services/LookingGlass.php index 367340ab6..057209d87 100644 --- a/app/Http/Middleware/Services/LookingGlass.php +++ b/app/Http/Middleware/Services/LookingGlass.php @@ -104,7 +104,7 @@ public function handle($request, Closure $next ) $router = D2EM::getRepository( RouterEntity::class )->findOneBy( [ 'handle' => $request->handle ] ); if( !$router || !$router->hasApi() ) { - AlertContainer::push( "Handle not found", Alert::DANGER ); + AlertContainer::push( "No router with the provided handle was found", Alert::DANGER ); return redirect( route( 'lg::index' ) ); } } catch( RouterException $e ) { @@ -118,8 +118,7 @@ public function handle($request, Closure $next ) } if( ( $request->net || $request->mask ) && !$this->validateNetworkRoute( $request ) ) { - AlertContainer::push( "Invalid network prefix", Alert::DANGER ); - return redirect( route( 'lg::bgp-sum', [ 'handle' => $request->handle ] ) ); + abort(404); } // let's authorise for access (this throws an exception) diff --git a/resources/views/services/lg/bgp-summary.foil.php b/resources/views/services/lg/bgp-summary.foil.php index fae9b1c9a..cc61bf83d 100644 --- a/resources/views/services/lg/bgp-summary.foil.php +++ b/resources/views/services/lg/bgp-summary.foil.php @@ -52,7 +52,7 @@ neighbor_address?> - ee( $p->description_short ) ?? $t->ee( $p->description ) ?? "" ?> + description_short ?? false ) ? $t->ee( $p->description_short ) : $t->ee( $p->description ?? "" ) ?> asNumber( $p->neighbor_as, false ) ?>