On Nov 24, 2004, at 1:23 PM, Richard Turner wrote:
> Ah, good, I'm glad it's not just me doing something stupid! Is the
> patch supposed to be in the body of the message like that? How do I
> apply it?
The patch appears to be MIME Base64 encoded. So:
~% ruby -r rmail -e 'print RMail::Utils.base64_decode($stdin.read)' <
shugopatch
--- soap/wsdlDriver.rb.old 2004-11-24 13:29:54.000000000 +0900
+++ soap/wsdlDriver.rb 2004-11-24 14:52:42.000000000 +0900
@@ -59,6 +59,7 @@
if port.soap_address.nil?
raise FactoryError.new("soap:address element not found in WSDL.")
end
+ port.soap_address.location.untaint
WSDLDriver.new(@wsdl, port, @logdev)
end
@@ -308,7 +309,12 @@
def create_method_obj(names, params)
o = Object.new
for idx in 0 ... params.length
- o.instance_eval("@#{ names[idx] } = params[idx]")
+ if /\A\w+\z/.match(names[idx])
+ name = names[idx].dup.untaint
+ else
+ name = names[idx]
+ end
+ o.instance_eval("@#{ name } = params[idx]")
end
o
end
@@ -452,9 +458,14 @@
i = 0
param_names = parts_names.collect { |orgname| i += 1; "arg#{ i
}" }
callparam = (param_names.collect { |pname| ", " + pname }).join
+ if /\A\w+\z/.match(name)
+ method_name = name.untaint
+ else
+ method_name = name
+ end
@host.instance_eval <<-EOS
- def #{ name }(#{ param_names.join(", ") })
- @servant.rpc_send(#{ name.dump }#{ callparam })
+ def #{ method_name }(#{ param_names.join(", ") })
+ @servant.rpc_send(#{ method_name.dump }#{ callparam })
end
EOS
end
--- soap/mapping/wsdlRegistry.rb.old 2004-11-24 14:07:41.000000000
+0900
+++ soap/mapping/wsdlRegistry.rb 2004-11-24 14:07:49.000000000
+0900
@@ -144,7 +144,7 @@
def elements2soap(obj, soap_obj, elements)
elements.each do |element|
name = element.name.name
- child_obj = obj.instance_eval("@#{ name }")
+ child_obj = obj.instance_variable_get("@#{ name }")
soap_obj.add(name, Mapping._obj2soap(child_obj, self,
element.type))
end
end
Pacem in terris / Mir / Shanti / Salaam / Heiwa
Kevin R. Bullock