Permalink
Browse files

Check code syntax

  • Loading branch information...
kinoppyd committed Jul 10, 2018
1 parent ce54f49 commit a1ae3efaefc7cc9b1d57197a59ff07fc4e774c24
Showing with 6 additions and 0 deletions.
  1. +6 −0 app.rb
6 app.rb
@@ -25,6 +25,12 @@ def banned_method(*_); raise SecurityError.new; end
on /^ruby:\s+(.+)$/ do |code|
code = CGI.unescapeHTML(code)
begin
RubyVM::InstructionSequence.compile(code)
rescue SyntaxError => e
return e.message
end
def tainted(code)
<<"CLEANROOM"
module CleanRoom

0 comments on commit a1ae3ef

Please sign in to comment.