mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
22 lines
502 B
Ruby
22 lines
502 B
Ruby
class TestController < ActionController::Base
|
|
# this should get picked up
|
|
def unsafe_zlib_unzip
|
|
path = params[:file]
|
|
Zlib::Inflate.inflate(path)
|
|
end
|
|
|
|
# this should not get picked up
|
|
def safe_zlib_unzip
|
|
Zlib::Inflate.inflate(file)
|
|
end
|
|
|
|
# this should get picked up
|
|
def unsafe_zlib_unzip
|
|
Zip::File.open_buffer(params[:file])
|
|
end
|
|
|
|
# this should not get picked up
|
|
def safe_zlib_unzip
|
|
Zip::File.open_buffer(file)
|
|
end
|
|
end |