From 4ffeddaf5a59301d6fde050c371d53adfd3fa5df Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Fri, 16 Feb 2024 14:07:29 -0600 Subject: [PATCH] only render tutorial page if number 1-10 --- app/tutorial.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tutorial.rb b/app/tutorial.rb index 7a6523a0..cbef80bf 100644 --- a/app/tutorial.rb +++ b/app/tutorial.rb @@ -31,7 +31,7 @@ end get '/tutorial/:section/:page/?' do require_login @page = params[:page] - not_found if @page.to_i == 0 + not_found unless @page.match?(/\A[1-9]\z|\A10\z/) not_found unless %w{html css js}.include?(params[:section]) @section = params[:section]