dup http resource so modules don't inadvertantly modify it

git-svn-id: file:///home/svn/framework3/trunk@7608 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2009-11-25 06:45:14 +00:00
parent 70d5e219e4
commit 6bd2e7f5b4
1 changed files with 3 additions and 1 deletions

View File

@ -502,7 +502,9 @@ module Exploit::Remote::HttpServer
# Returns the last-used resource path
#
def get_resource
@service_path
# We don't want modules modifying their service_path inadvertantly, so
# give them a dup. Can be nil during module setup.
@service_path ? @service_path.dup : nil
end
#