2026-05-26 12:59:02 -05:00
|
|
|
# Ruby ActionController action, benign.
|
2026-05-14 17:45:42 -05:00
|
|
|
|
2026-05-26 12:59:02 -05:00
|
|
|
require 'action_controller'
|
|
|
|
|
|
|
|
|
|
class ApplicationController < ActionController::Base
|
|
|
|
|
self.view_paths = []
|
2026-05-14 17:45:42 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class UsersController < ApplicationController
|
|
|
|
|
def index
|
2026-05-26 12:59:02 -05:00
|
|
|
payload = params[:payload].to_s
|
2026-05-14 17:45:42 -05:00
|
|
|
unless payload =~ /\A[A-Za-z0-9]{1,32}\z/
|
|
|
|
|
STDOUT.print("invalid\n")
|
2026-05-26 12:59:02 -05:00
|
|
|
render plain: "invalid"
|
|
|
|
|
return
|
2026-05-14 17:45:42 -05:00
|
|
|
end
|
|
|
|
|
out = `echo hello`
|
|
|
|
|
STDOUT.print(out)
|
2026-05-26 12:59:02 -05:00
|
|
|
render plain: out
|
2026-05-14 17:45:42 -05:00
|
|
|
end
|
|
|
|
|
end
|