Commits

Stefan Saasen committed 4712d50

Show 404 not found page if the Confluence page doesn't exist

Comments (0)

Files changed (1)

src/main/ruby/app/confluence_sinatra_app.rb

   get '/wiki/:space/:title' do
     title, space = unescape(params[:title]), params[:space]
     @page = page_manager.get_page(space, title)
+    raise Sinatra::NotFound unless @page
     raise PermissionException, "You are not allowed to view this page" unless current_user_has_view_permission(@page)
     @body = replace_links(view_renderer.render(@page), '/display', '/plugins/servlet/sinatra/wiki')
     erb :show_page